!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./core"],e):e(jQuery)}(function(o){"use strict";var n=!1;return o(document).on("mouseup",function(){n=!1}),o.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===o.data(e.target,t.widgetName+".preventClickEvent"))return o.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){var t,s,i;if(!n)return this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),s=1===(this._mouseDownEvent=e).which,i=!("string"!=typeof(t=this).options.cancel||!e.target.nodeName)&&o(e.target).closest(this.options.cancel).length,s&&!i&&this._mouseCapture(e)&&(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?e.preventDefault():(!0===o.data(e.target,this.widgetName+".preventClickEvent")&&o.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0)),!0},_mouseMove:function(e){if(this._mouseMoved){if(o.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&o.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}); !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","./core"],e):e(jQuery)}(function(o){"use strict";return o.widget("ui.slider",o.ui.mouse,{version:"1.13.2",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t=this.options,i=this.element.find(".ui-slider-handle"),s=[],a=t.values&&t.values.length||1;for(i.length>a&&(i.slice(a).remove(),i=i.slice(0,a)),e=i.length;e");this.handles=i.add(o(s.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){o(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:Array.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=o("
").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,a,n,t,h,l=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(i-l.values(e));(t=this._valueMax()?this._valueMax():(t=0=t&&(i+=0this.options.max&&(e-=i),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return e=null!==this.options.min?Math.max(e,this._precisionOf(this.options.min)):e},_precisionOf:function(e){var e=e.toString(),t=e.indexOf(".");return-1===t?0:e.length-t-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,i,e,s,a,n=this.options.range,h=this.options,l=this,u=!this._animateOff&&h.animate,r={};this._hasMultipleValues()?this.handles.each(function(e){i=(l.values(e)-l._valueMin())/(l._valueMax()-l._valueMin())*100,r["horizontal"===l.orientation?"left":"bottom"]=i+"%",o(this).stop(1,1)[u?"animate":"css"](r,h.animate),!0===l.options.range&&("horizontal"===l.orientation?(0===e&&l.range.stop(1,1)[u?"animate":"css"]({left:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:h.animate})):(0===e&&l.range.stop(1,1)[u?"animate":"css"]({bottom:i+"%"},h.animate),1===e&&l.range[u?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:h.animate}))),t=i}):(e=this.value(),s=this._valueMin(),a=this._valueMax(),i=a!==s?(e-s)/(a-s)*100:0,r["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[u?"animate":"css"](r,h.animate),"min"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:i+"%"},h.animate),"max"===n&&"horizontal"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({width:100-i+"%"},h.animate),"min"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:i+"%"},h.animate),"max"===n&&"vertical"===this.orientation&&this.range.stop(1,1)[u?"animate":"css"]({height:100-i+"%"},h.animate))},_handleEvents:{keydown:function(e){var t,i,s,a=o(e.target).data("ui-slider-handle-index");switch(e.keyCode){case o.ui.keyCode.HOME:case o.ui.keyCode.END:case o.ui.keyCode.PAGE_UP:case o.ui.keyCode.PAGE_DOWN:case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(e.preventDefault(),this._keySliding||(this._keySliding=!0,this._addClass(o(e.target),null,"ui-state-active"),!1!==this._start(e,a)))break;return}switch(s=this.options.step,t=i=this._hasMultipleValues()?this.values(a):this.value(),e.keyCode){case o.ui.keyCode.HOME:i=this._valueMin();break;case o.ui.keyCode.END:i=this._valueMax();break;case o.ui.keyCode.PAGE_UP:i=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/this.numPages);break;case o.ui.keyCode.UP:case o.ui.keyCode.RIGHT:if(t===this._valueMax())return;i=this._trimAlignValue(t+s);break;case o.ui.keyCode.DOWN:case o.ui.keyCode.LEFT:if(t===this._valueMin())return;i=this._trimAlignValue(t-s)}this._slide(e,a,i)},keyup:function(e){var t=o(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),this._removeClass(o(e.target),null,"ui-state-active"))}}})}); fbuilderjQuery=(typeof fbuilderjQuery!='undefined')?fbuilderjQuery:jQuery;fbuilderjQuery(window).bind('pageshow',function(event){if(typeof event.originalEvent['persisted']!='undefined'&&event.originalEvent['persisted'])location.reload();});fbuilderjQuery.fbuilderjQueryGenerator=function(){(function($){if(!('fbuilder'in $)){$.fbuilder=$.fbuilder||{};$.fbuilder['objName']='fbuilderjQuery';;(function(root){var lib={};lib.cf_logical_version='0.1';lib.IF=function(condition,if_true,if_false){if(condition){return(typeof if_true==='undefined')?true:if_true;}else{return(typeof if_false==='undefined')?false:if_false;}};lib.AND=function(){for(var i=0,h=arguments.length;i=12)?'pm':'am';h=h%12;h=(h==0)?12:h;} h=(h<10)?'0'+h:h;i=(i<10)?'0'+i:i;s=(s<10)?'0'+s:s;return format.replace(/\by{2}\b/i,y%100).replace(/y+/i,y).replace(/m+/i,m).replace(/d+/i,d).replace(/h+/i,h).replace(/i+/i,i).replace(/s+/i,s).replace(/a+/i,a);} return num;};} if(window.SUM==undefined){window.SUM=window.sum=function(){var r=0,l=arguments.length,t,callback=function(x){return x;};if(l){if(typeof arguments[l-1]=='function'){callback=arguments[l-1];l-=1;} for(var i=0;i20){e-=20;x/=Math.pow(10,e);x+=(new Array(e+1)).join('0');}} return x;};} if(window.DECIMALTOSCIENTIFIC==undefined){window.DECIMALTOSCIENTIFIC=window.decimaltoscientific=function(x){var v=Number(x).toExponential();return(isNaN(v)||x=='')?x:v;};} if(window.FORMAT==undefined){window.FORMAT=window.format=function(x,o){return fbuilderjQuery.fbuilder.calculator.format(x,o);};} if(window.UNFORMAT==undefined){window.UNFORMAT=window.unformat=function(x,o){try {var s;try {s=(typeof o!='undefined'&&'decimalsymbol'in o)?o['decimalsymbol']:'.';}catch(err){s='.';} return(x+'').replace(new RegExp('[^\\-\\d\\'+s+']','gi'),'').replace(new RegExp('\\'+s,'gi'),'.')*1;} catch(err){return x;}};} fbuilderjQuery['fbuilder']['extend_window'](fbuilderjQuery['fbuilder']['modules']['default']['prefix'],CF_LOGICAL);},'validator':function(v){return(typeof v=='number')?isFinite(v):(typeof v!='undefined');}};;(function(root){var lib={},default_format=(typeof window.DATETIMEFORMAT!='undefined')?window.DATETIMEFORMAT:'yyyy-mm-dd hh:ii:ss a',regExp='';Date.prototype.valid=function(){return isFinite(this);};function _processArguments(date,format,leading_zeros){if(arguments.length==1&&(typeof date=='boolean'||date==0||date==1)){leading_zeros=date;date=undefined;format=undefined;} leading_zeros=leading_zeros||0;return{date:date,format:format,leading_zeros:leading_zeros};} function _leadingZeros(n){return n<10?0+''+n:n;};function _getDateObj(date,format){var d=new Date();format=format||default_format;if(typeof date!='undefined'){if(typeof date=='number'){d=new Date(Math.ceil(date*86400000));}else if(typeof date=='string'){var p;if(null!=(p=/(\d{4})[\/\-\.](\d{1,2})[\/\-\.](\d{1,2})/.exec(date))){if(/y{4}[\/\-\.]m{2}[\/\-\.]d{2}/i.test(format)){d=new Date(p[1],(p[2]-1),p[3]);}else{d=new Date(p[1],(p[3]-1),p[2]);} date=date.replace(p[0],'');} if(null!=(p=/(\d{1,2})[\/\-\.](\d{1,2})[\/\-\.](\d{4})/.exec(date))){if(/d{2}[\/\-\.]m{2}[\/\-\.]y{4}/i.test(format)){d=new Date(p[3],(p[2]-1),p[1]);}else{d=new Date(p[3],(p[1]-1),p[2]);} date=date.replace(p[0],'');} if(null!=(p=/(\d{1,2})[\/\-\.](\d{1,2})[\/\-\.](\d{2})/.exec(date))){if(/d{2}[\/\-\.]m{2}[\/\-\.]y{2}/i.test(format)){d=new Date(2000+p[3]*1,(p[2]-1),p[1]);}else if(/m{2}[\/\-\.]d{2}[\/\-\.]y{2}/i.test(format)){d=new Date(2000+p[3]*1,(p[1]-1),p[2]);}else if(/y{2}[\/\-\.]d{2}[\/\-\.]m{2}/i.test(format)){d=new Date(2000+p[1]*1,(p[3]-1),p[2]);}else if(/y{2}[\/\-\.]m{2}[\/\-\.]d{2}/i.test(format)){d=new Date(2000+p[1]*1,(p[2]-1),p[3]);} date=date.replace(p[0],'');} if(null!=(p=/(\d{1,2})[:\.](\d{1,2})([:\.](\d{1,2}))?\s*([ap]m)?/i.exec(date))){if(/h+/i.test(format)){if(typeof p[5]!='undefined'&&/pm/i.test(p[5]))p[1]=(p[1]*1+12)%24;d.setHours(p[1]);} if(/i+/i.test(format))d.setMinutes(p[2]);if(/s+/i.test(format)&&(typeof p[4]!='undefined'))d.setSeconds(p[4]);}}else{d=new Date(date);}} return d;};lib.cf_datetime_version='0.1';lib.DATEOBJ=function(date,format){var d=_getDateObj(date,format);if(d.valid())return d;return false;};lib.YEAR=function(date,format){var d=_getDateObj(date,format);if(d.valid())return d.getFullYear();return false;};lib.MONTH=function(date,format,leading_zeros){var tmp=_processArguments.apply(null,arguments);date=tmp['date'];format=tmp['format'];leading_zeros=tmp['leading_zeros'];var d=_getDateObj(date,format),r=false;if(d.valid()){r=d.getMonth()+1;if(leading_zeros)r=_leadingZeros(r);} return r;};lib.MONTHNAME=function(date,format,locale){var d=lib.DATEOBJ(date,format),r=false;if(d){locale=locale||'default';try{r=d.toLocaleString(locale,{month:'long'});}catch(err){r=d.toLocaleString('default',{month:'long'});}} return r;};lib.WEEKDAYNAME=function(date,format,locale){var d=lib.DATEOBJ(date,format),r=false;if(d){locale=locale||'default';try{r=d.toLocaleString(locale,{weekday:'long'});}catch(err){r=d.toLocaleString('default',{weekday:'long'});}} return r;};lib.DAY=function(date,format,leading_zeros){var tmp=_processArguments.apply(null,arguments);date=tmp['date'];format=tmp['format'];leading_zeros=tmp['leading_zeros'];var d=_getDateObj(date,format),r=false;if(d.valid()){r=d.getDate();if(leading_zeros)r=_leadingZeros(r);} return r;};lib.WEEKDAY=function(date,format,leading_zeros){var tmp=_processArguments.apply(null,arguments);date=tmp['date'];format=tmp['format'];leading_zeros=tmp['leading_zeros'];var d=_getDateObj(date,format),r=false;if(d.valid()){r=d.getDay()+1;if(leading_zeros)r=_leadingZeros(r);} return r;};lib.WEEKNUM=function(date,format,leading_zeros){var tmp=_processArguments.apply(null,arguments);date=tmp['date'];format=tmp['format'];leading_zeros=tmp['leading_zeros'];var d=_getDateObj(date,format),i,n,r=false;if(d.valid()){i=new Date(d.getFullYear(),0,1);n=(d-i)/(24*60*60*1000);r=Math.max(Math.ceil(n/7),1);if(leading_zeros)r=_leadingZeros(r);} return r;};lib.HOURS=function(date,format,leading_zeros){var tmp=_processArguments.apply(null,arguments);date=tmp['date'];format=tmp['format'];leading_zeros=tmp['leading_zeros'];var d=_getDateObj(date,format),r=false;if(d.valid()){r=d.getHours();if(leading_zeros)r=_leadingZeros(r);} return r;};lib.MINUTES=function(date,format,leading_zeros){var tmp=_processArguments.apply(null,arguments);date=tmp['date'];format=tmp['format'];leading_zeros=tmp['leading_zeros'];var d=_getDateObj(date,format),r=false;if(d.valid()){r=d.getMinutes();if(leading_zeros)r=_leadingZeros(r);} return r;};lib.SECONDS=function(date,format,leading_zeros){var tmp=_processArguments.apply(null,arguments);date=tmp['date'];format=tmp['format'];leading_zeros=tmp['leading_zeros'];var d=_getDateObj(date,format),r=false;if(d.valid()){r=d.getSeconds();if(leading_zeros)r=_leadingZeros(r);} return r;};lib.NOW=function(){return _getDateObj();};lib.TODAY=function(){var d=_getDateObj();d.setHours(0);d.setMinutes(0);d.setSeconds(0);return d;};lib.EOMONTH=function(d,n){n=(n||0)+1;var d1=_getDateObj(d);d1.setDate(1);d1.setMonth(d1.getMonth()+n);d1.setDate(d1.getDate()-1);return d1;};lib.DATEDIFF=function(date_one,date_two,date_format,return_format){var d1=_getDateObj(date_one,date_format),d2=_getDateObj(date_two,date_format),diff,r={'years':-1,'months':-1,'days':-1,'hours':-1,'minutes':-1,'seconds':-1};if(d1.valid()&&d2.valid()){if(d1.valueOf()>d2.valueOf()){d2=_getDateObj(date_one,date_format);d1=_getDateObj(date_two,date_format);} diff=d2.valueOf()-d1.valueOf();if(typeof return_format=='undefined'||return_format=='d'){r.days=Math.floor(diff/86400000);}else{var months,days,tmp;months=(d2.getFullYear()-d1.getFullYear())*12;months-=d1.getMonth()+1;months+=d2.getMonth()+1;days=d2.getDate()-d1.getDate();if(days<0){months--;tmp=new Date(d2.getFullYear(),d2.getMonth());tmp.setDate(tmp.getDate()-1);tmp.setDate(d1.getDate());if(d1.getDate()!=tmp.getDate()){tmp=new Date(d2.getFullYear(),d2.getMonth());tmp.setDate(tmp.getDate()-1);} days=Math.abs(d2.valueOf()-tmp.valueOf())/(24*60*60*1000);} r.months=months;r.days=Math.floor(days);if(/y/i.test(return_format)){r.years=Math.floor(months/12);r.months=months%12;}} r.hours=Math.floor(diff%86400000/3600000);r.minutes=Math.floor(diff%86400000%3600000/60000);r.seconds=Math.floor(diff%86400000%3600000%60000/1000);} return r;};if(typeof NETWORKDAYS=='undefined'){lib.NETWORKDAYS=lib.NETWORKDAYS=function(start_date,end_date,date_format,holidays,holidays_format){var tmp,result=0,min_date_tmp,max_date_tmp;date_format=date_format||'mm/dd/yyyy';holidays=holidays||[];holidays_format=holidays_format||date_format;start_date=DATEOBJ(start_date,date_format);end_date=DATEOBJ(end_date,date_format);min_date_tmp=Math.min(start_date,end_date);max_date_tmp=Math.max(start_date,end_date);start_date=new Date(min_date_tmp);end_date=new Date(max_date_tmp);if(!Array.isArray(holidays))holidays=[holidays];for(var i=0,h=holidays.length;i=12)?'pm':'am';m=(m<10)?'0'+m:m;d=(d<10)?'0'+d:d;if(/a+/.test(format)){h=h%12;h=(h)?h:12;} h=(h<10)?'0'+h:h;i=(i<10)?'0'+i:i;s=(s<10)?'0'+s:s;return format.replace(/\by{2}\b/i,date.getFullYear()%100).replace(/y+/i,date.getFullYear()).replace(/m+/i,m).replace(/d+/i,d).replace(/h+/i,h).replace(/i+/i,i).replace(/s+/i,s).replace(/a+/i,a);} return date;};root.CF_DATETIME=lib;})(this);fbuilderjQuery=(typeof fbuilderjQuery!='undefined')?fbuilderjQuery:jQuery;fbuilderjQuery['fbuilder']=fbuilderjQuery['fbuilder']||{};fbuilderjQuery['fbuilder']['modules']=fbuilderjQuery['fbuilder']['modules']||{};fbuilderjQuery['fbuilder']['modules']['datetime']={'prefix':'','callback':function(){fbuilderjQuery['fbuilder']['extend_window'](fbuilderjQuery['fbuilder']['modules']['datetime']['prefix'],CF_DATETIME);},'validator':function(v){if(/^\s*((\d{4}[\/\-\.]\d{1,2}[\/\-\.]\d{1,2})|(\d{1,2}[\/\-\.]\d{1,2}[\/\-\.]\d{4}))?\s*(\d{1,2}\s*:\s*\d{1,2}(\s*:\s*\d{1,2})?(\s*[ap]m)?)?\s*$/i.test(v)){return true;} return false;}};;(function(root){var lib={formsDependency:{}},elements_equations={};lib.cf_processing_version='0.1';function _getForm(_form){if(typeof _form=='undefined'||_form==null){if('currentFormId'in fbuilderjQuery.fbuilder)_form=fbuilderjQuery.fbuilder.currentFormId;else return'_1';} if(/^_\d*$/.test(_form))return _form;if(/^\d*$/.test(_form))return'_'+_form;return $($(_form).length?_form:'#'+_form).find('[name="cp_calculatedfieldsf_pform_psequence"]').val();} function _getField(_field,_form){try {if(typeof _field=='undefined')return false;if(typeof _field=='object'){if('ftype'in _field)return _field;if('jquery'in _field){if(_field.length)_field=_field[0];else return false;} if('getAttribute'in _field){_form=$(_field).closest('form');var to_check=_field.getAttribute('class').match(/fieldname\d+/);if(to_check)_field=to_check[0];else{_field=_field.getAttribute('name').match(/fieldname\d+/)[0];}} else return false;} if(typeof _form=='undefined'&&typeof _field=='string'&&_field.match(/fieldname\d+(_\d+)/))_form=_field.match(/fieldname\d+(_\d+)/)[1];return $.fbuilder['forms'][_getForm(_form)].getItem(_field);}catch(err){return false;}} function _fillElementsArray(e){if(!(e in elements_equations)){elements_equations[e]={};$(e).on('change keyup',function(){for(let i in elements_equations[e]){EVALEQUATION(i);}});} if('currentEq'in $.fbuilder){if(!($.fbuilder['currentEq']['result']in elements_equations[e])){elements_equations[e][$.fbuilder['currentEq']['result']]=1;}}} lib.ELEMENTINFO=function(selector,to_get){let e=$(selector),r=[];to_get=(new String(to_get||'value')).toLowerCase().replace(/^\s*/,'').replace(/\s*$/,'');to_get=['html','text'].indexOf(to_get)!=-1?to_get:'val';if(e.length){_fillElementsArray(selector);e.each(function(i,e){r.push($(e)[to_get]());});} return r.length==0?null:(r.length==1?r[0]:r);};lib.getField=function(_field,_form){var _fi=_getField(_field,_form),_fo;if(_fi){try{_fo=_fi['form_identifier'];if(_fo&&_fi&&'currentFormId'in $.fbuilder&&'currentEq'in $.fbuilder&&$.fbuilder['currentEq']['identifier']!=_fo){var _eqResultField=$.fbuilder['currentEq']['result'];if(!(_fi.name in lib.formsDependency)){lib.formsDependency[_fi.name]={};$('[name *="'+_fi.name+'"]').on('change keyup depEvent',function(){var _fname=$(this).attr('name').match(/fieldname\d+_\d+/)[0];if(_fname in lib.formsDependency){for(var i in lib.formsDependency[_fname]){EVALEQUATION(i,lib.formsDependency[_fname][i])}}});} lib.formsDependency[_fi.name][_eqResultField]=$.fbuilder['currentFormId'];}}catch(err){}}else if(typeof _form!='undefined'){if('currentFormId'in $.fbuilder&&'currentEq'in $.fbuilder){var _eqResultField=$.fbuilder['currentEq']['result'];$(_form).on('change keyup depEvent','[name*="'+_field+'"]',(function(_field){return function(){EVALEQUATION(_field);};})(_eqResultField));}} return _fi;};lib.validform=lib.VALIDFORM=lib.ValidForm=function(_form,_silent){_silent=_silent||false;var o=_getForm(_form),f;if(o){f=$('[id="'+$.fbuilder.forms[o]['formId']+'"]');if(f.length)return _silent?f.validate().checkForm():f.valid();} return false;};lib.validfield=lib.VALIDFIELD=lib.ValidField=function(_field,_form,_silent){_silent=_silent||false;var o=_getForm(_form),f=_getField(_field,_form),j;if(f){j=f.jQueryRef().find(':input');if(j.length) return _silent?j.closest('form').validate().check(j):j.valid();} return false;};lib.activatefield=lib.ACTIVATEFIELD=function(_field,_form){var o=_getForm(_form),f=_getField(_field,_form),j;if(f){j=f.jQueryRef();j.removeClass('ignorefield');if(j.find('[id*="'+f.name+'"]').hasClass('ignore')){j.add(j.find('.fields')).show();if(f.name in $.fbuilder.forms[o].toHide)delete $.fbuilder.forms[o].toHide[f.name];if(!(f.name in $.fbuilder.forms[o].toShow))$.fbuilder.forms[o].toShow[f.name]={'ref':{}};j.find('[id*="'+f.name+'"]').removeClass('ignore').change();$.fbuilder.showHideDep({'formIdentifier':o,'fieldIdentifier':f.name});}}};lib.ignorefield=lib.IGNOREFIELD=function(_field,_form){var o=_getForm(_form),f=_getField(_field,_form),j;if(f){j=f.jQueryRef();j.addClass('ignorefield');if(!j.find('[id*="'+f.name+'"]').hasClass('ignore')){j.add(j.find('.fields')).hide();if(!(f.name in $.fbuilder.forms[o].toHide))$.fbuilder.forms[o].toHide[f.name]={};if(f.name in $.fbuilder.forms[o].toShow)delete $.fbuilder.forms[o].toShow[f.name];j.find('[id*="'+f.name+'"]').addClass('ignore').change();$.fbuilder.showHideDep({'formIdentifier':o,'fieldIdentifier':f.name});}}};lib.isignored=lib.ISIGNORED=function(_field,_form){var o=_getForm(_form),f=_getField(_field,_form),j;if(f)return 00){$("#fieldlist"+fid+" .pb0").find(".field").removeClass("ignorepb");try {$("#fieldlist"+fid+" .pb0").find(".field")[0].focus();} catch(e){}} if(f.attr('data-evalequations')*1){f.addClass('cff-reset-form');$.fbuilder['calculator'].defaultCalc('#'+id,false);}},50);}}else{setTimeout(function(){f.removeClass('cff-reset-form');},500);}}}catch(err){}} if(typeof f!='undefined'){_reset(jQuery(f));}else{for(var i in fbuilderjQuery.fbuilder.forms){_reset(jQuery('[id="'+fbuilderjQuery.fbuilder.forms[i].formId+'"]'));}}};if(window.cffsanitize==undefined){lib.cffsanitize=lib.CFFSANITIZE=function(v,script_only){script_only=script_only||0;if(Array.isArray(v)||(typeof v==='object'&&!Array.isArray(v)&&v!==null)){for(var i in v){v[i]=lib.CFFSANITIZE(v[i],script_only);}}else{if(typeof v=='string'){if(script_only){v=v.replace(//ig,'').replace(/]*>/ig,'').replace(/(\b)(on[a-z]+)\s*=/ig,"$1_$2=");}else{v=jQuery('

').text(v).html();}}} return v;};} root.CF_FIELDS_MANAGEMENT=lib;})(this);fbuilderjQuery=(typeof fbuilderjQuery!='undefined')?fbuilderjQuery:jQuery;fbuilderjQuery['fbuilder']=fbuilderjQuery['fbuilder']||{};fbuilderjQuery['fbuilder']['modules']=fbuilderjQuery['fbuilder']['modules']||{};fbuilderjQuery['fbuilder']['modules']['processing']={'prefix':'','callback':function(){fbuilderjQuery['fbuilder']['extend_window'](fbuilderjQuery['fbuilder']['modules']['processing']['prefix'],CF_FIELDS_MANAGEMENT);}};;(function(root){var lib={records:{}};lib.cff_connector_version='0.1';lib.cffProxy=lib.cffproxy=lib.CFFPROXY=function(){if(typeof fbuilderjQuery=='undefined'||!arguments.length||typeof arguments[0]!='function')return;var $=fbuilderjQuery,args=Array.prototype.slice.call(arguments);index=args.toString();if(typeof lib.records[index]!='undefined')return lib.records[index];var form_id=(typeof $.fbuilder['currentFormId']!='undefined')?$.fbuilder['currentFormId']:'cp_calculatedfieldsf_pform_1',aux=(function(eq,index){return function(value){lib.records[index]=value;$.fbuilder.calculator.enqueueEquation(eq.identifier,[eq]);$.fbuilder.calculator.removePending(eq.identifier);if(!(eq.identifier in $.fbuilder.calculator.processing_queue)||!$.fbuilder.calculator.processing_queue[eq.identifier]){$.fbuilder.calculator.processQueue(eq.identifier);}};})($.fbuilder['currentEq'],index),f=args[0];args.shift();args.push(aux);$.fbuilder.calculator.addPending($.fbuilder['currentEq']['identifier']);setTimeout(function(){f.apply(null,args);},5);};root.CF_CONNECTOR=lib;})(this);fbuilderjQuery=(typeof fbuilderjQuery!='undefined')?fbuilderjQuery:jQuery;fbuilderjQuery['fbuilder']=fbuilderjQuery['fbuilder']||{};fbuilderjQuery['fbuilder']['modules']=fbuilderjQuery['fbuilder']['modules']||{};fbuilderjQuery['fbuilder']['modules']['connector']={'prefix':'','callback':function(){fbuilderjQuery['fbuilder']['extend_window'](fbuilderjQuery['fbuilder']['modules']['connector']['prefix'],CF_CONNECTOR);}};;(function(root){var lib={records:{}};lib.cff_url_version='0.1';lib.getReferrer=lib.getreferrer=lib.GETREFERRER=function(){return document.referrer||null;};lib.generateURL=lib.generateurl=lib.GENERATEURL=function(url,params,hash){var urlComponents=url.split('#'),queryString='',connector='';if(typeof params=='object'&¶ms){connector=(url.indexOf('?')==-1)?'?':'&';queryString=jQuery.param(params);} if(typeof hash=='string')urlComponents[1]=hash;urlComponents[0]+=connector+queryString;return urlComponents.join('#');};lib.redirectToURL=lib.redirecttourl=lib.REDIRECTTOURL=function(url,obj){document.location.href=url+(obj?(url.indexOf('?')===-1?'?':'&')+$.param(obj):'');};lib.getURL=lib.geturl=lib.GETURL=function(){return document.location.href;};lib.getURLProtocol=lib.geturlprotocol=lib.GETURLPROTOCOL=function(){return document.location.protocol.toLowerCase();};lib.getBaseURL=lib.getbaseurl=lib.GETBASEURL=function(){return window.location.protocol+'//'+window.location.host+'/';};lib.getURLHash=lib.geturlhash=lib.GETURLHASH=function(nohash){return window.location.hash.replace((nohash)?/^#/:'','');};lib.getURLPath=lib.geturlpath=lib.GETURLPATH=function(noslash){return window.location.pathname.replace((noslash)?new RegExp('^\/','g'):'','').replace((noslash)?new RegExp('\/$','g'):'','');};lib.getURLParameters=lib.geturlparameters=lib.GETURLPARAMETERS=function(url){var qs=url?url.split('?')[1]:window.location.search.slice(1),obj={};if(qs){qs=qs.split('#')[0];var arr=qs.split('&');for(var i=0;i').text(value).html().replace(/"/g,""").replace(/&lt;/g,'<').replace(/&gt;/g,'>');};$.fbuilder['htmlDecode']=window['cff_html_decode']=function(value){return(/&(?:#x[a-f0-9]+|#[0-9]+|[a-z0-9]+);?/ig.test(value))?$('

').html(value).text():value;};$.fbuilder['sanitize']=window['cff_sanitize']=function(value){if(typeof value=='string') value=value.replace(//ig,'').replace(/]*>/ig,'');return value;};$.fbuilder['escapeSymbol']=function(value){return value.replace(/([\^\$\-\.\,\[\]\(\)\/\\\*\?\+\!\{\}])/g,"\\$1");};$.fbuilder['parseValStr']=function(value,raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;value=$.trim(value||'');value=value.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"');var r=($.isNumeric(value))?((raw)?value:value*1):((no_quotes)?value:'"'+value+'"');return raw?r:(window.cffsanitize!=undefined?cffsanitize(r,true):r);};$.fbuilder['parseVal']=function(value,thousand,decimal,no_quotes){if(!!value==false)return 0;no_quotes=no_quotes||false;if(/(\d{1,2}[\/\.\-]\d{1,2}[\/\.\-]\d{4})|(\d{4}[\/\.\-]\d{1,2}[\/\.\-]\d{1,2})/.test(value)) return $.fbuilder['parseValStr'](value,false,no_quotes);thousand=$.fbuilder.escapeSymbol($.trim((typeof thousand!='undefined')?thousand:','));decimal=$.trim((!!!decimal||/^\s*$/.test(decimal))?'.':decimal);var p,_thousand=/^\s*$/.test(thousand)?'\,':thousand,t=new String(value);try{if(1==t.match(new RegExp(_thousand,'g')).length){t=t.replace(new RegExp(_thousand+'\(\\d{1,2}\)$'),decimal+'$1');}}catch(err){} t=t.replace(new RegExp(thousand,'g'),'').replace(new RegExp($.fbuilder.escapeSymbol(decimal),'g'),'.').replace(/\s/g,'');p=/[+\-]?((\d+(\.\d+)?)|(\.\d+))(?:[eE][+\-]?\d+)?/.exec(t);return(p)?((/^0\d/.test(p[0]))?p[0].substr(1):p[0])*1:$.fbuilder['parseValStr'](value,false,no_quotes);};$.fbuilder['isMobile']=function(){try{document.createEvent("TouchEvent");return true;} catch(e){return false;}};$.fbuilder['setBrowserHistory']=function(r){if('history'in window){var b='#',s='';for(var id in $.fbuilder.forms){b+=s+'f'+id.replace(/[^\d]/g,'')+'p'+($.fbuilder.forms[id]['currentPage']||0);s='|';} history[(r)?'replaceState':'pushState']({},document.title,b);}};$.fbuilder['manageHistory']=function(onload){var b=(document.URL.split('#')[1]||null),m,f,t,flag=false;if(b){while(m=b.match(/f(\d+)p(\d+)\|?/)){f='_'+m[1];t=onload?0:m[2]*1;b=b.replace(m[0],'');flag=(!(f in $.fbuilder.forms)||t!=$.fbuilder['goToPage']({'formIdentifier':f,'from':0,'to':t,'animate':false}));}}else{for(f in $.fbuilder.forms) if('currentPage'in $.fbuilder.forms[f]) $.fbuilder['goToPage']({'formIdentifier':f,'from':0,'to':0,'animate':false});} if(flag)$.fbuilder.setBrowserHistory(true);};$.fbuilder['goToPage']=function(config){function swapPages(pageToHide,pageToShow,callback){var t=300,w=pageToHide.width(),f=pageToHide.closest('form'),fx=f.data('animation_effect')=='slide'?'slide':'fade';if(('animate'in config&&config.animate==false)||(f.data('animate_form')==undefined||f.data('animate_form')*1==0))t=0;if(fx=='fade'){pageToHide.fadeOut(t,function(){pageToHide.find(".field").addClass("ignorepb");pageToShow.fadeIn(t,function(){pageToShow.find(".ignorepb").removeClass("ignorepb");callback();if('callback'in config)config.callback();});});}else{f.css('overflow-x','hidden');var d=pageToHide.attr('page')*1
';captcha_tag.remove();} return html;},getSubmitHTML=function(){var submit_tag=$("#cp_subbtn"+opt.identifier+':not(:empty)'),html='';if(submit_tag.length){html+='
'+submit_tag.html()+'
';submit_tag.remove();} return html;};form_tag.addClass(theForm.formtemplate);theForm.form_tag=form_tag;if(!opt.cached){page_tag=$('
');header_tag.html($.fbuilder.sanitize(theForm.show()));fieldlist_tag.addClass(theForm.formlayout).append(page_tag);for(i;i
');fieldlist_tag.append(page_tag);}else{page_tag.append((items[i].ftype!='fhtml')?$.fbuilder.sanitize(items[i].show()):items[i].show());if(items[i].predefinedClick){page_tag.find("#"+items[i].name).attr({placeholder:items[i].predefined,value:""});} if(items[i].exclude){page_tag.find('.'+items[i].name).addClass('cff-exclude');} if('audiotutorial'in items[i]&&!/^\s*$/.test(items[i].audiotutorial)){(function(){var t=(typeof opt!='undefined'&&'messages'in opt&&'audio_tutorial'in opt.messages)?opt.messages.audio_tutorial:false,e=items[i].jQueryRef(),c=$(''),a=$('');a.appendTo(e.find('.dfield'));c.appendTo($(e.children('label')[0]||e));c.click(function(evt){var e=$(this);if(e.hasClass('cff-audio-stop-icon')){e.removeClass('cff-audio-stop-icon');a[0].pause();a[0].currentTime=0;}else{$('.cff-audio-stop-icon').click();e.addClass('cff-audio-stop-icon');a[0].play();} evt.stopPropagation();evt.preventDefault();return false;});})()} if(items[i].userhelpTooltip){var uh=items[i].jQueryRef();if(items[i].userhelp&&items[i].userhelp.length){if(items[i].tooltipIcon)$('').attr('uh',items[i].userhelp).appendTo($(uh.children('label')[0]||uh));else{var target=uh.find('input[type="button"],input[type="reset"],input[type="text"],input[type="number"],input[type="email"],input[type="file"],input[type="color"],input[type="date"],input[type="password"],input[type="email"],select,textarea');if(!target.length)target=uh.find('.slider');if(!target.length)target=uh.find('.dfield label');if(!target.length)target=uh.find('.dfield');if(!target.length)target=uh;$(target).attr('uh',items[i].userhelp);}} uh.find(".uh").remove();}}}}else{page=fieldlist_tag.find('.pbreak').length;i=items.length;} if(page>0){if(!opt.cached){$(".pb"+page,fieldlist_tag).addClass("pbEnd");$(".pbreak",fieldlist_tag).each(function(index){var code='',bSubmit='';if(index==page){code+=getCaptchaHTML();bSubmit=getSubmitHTML();} $(this).wrapInner('
').find('fieldset:eq(0)').prepend(''+opt.messages.pageof.replace(/\{\s*\d+\s*\}/,(index+1)).replace(/\{\s*\d+\s*\}/,(page+1))+'').append(code+'
'+opt.messages.previous+'
'+opt.messages.next+'
'+bSubmit+'
');});} fieldlist_tag.find(".pbPrevious,.pbNext").bind("keyup",function(evt){if(evt.which==13||evt.which==32)$(this).click();}).bind("click",{'identifier':opt.identifier},function(evt){var _from=($.fbuilder.forms[evt.data.identifier]['currentPage']||0),_inc=($(this).hasClass("pbPrevious"))?-1:1,_p=$.fbuilder['goToPage']({'formIdentifier':evt.data.identifier,'from':_from,'to':_from+_inc,'callback':function(){setTimeout(function(){if(_from!=_p)$.fbuilder.setBrowserHistory();if(_pDom.find('.fields:visible').length==0) if(_inc==-1&&0<_p)_pDom.find('.pbPrevious').click();else if(!_pDom.hasClass('pbEnd'))_pDom.find('.pbNext').click();},10);}}),_pDom=$('.pb'+_p);return false;});}else{if(!opt.cached)$(".pb"+page,fieldlist_tag).append(getCaptchaHTML()+getSubmitHTML());} if(!opt.cached&&opt.setCache){var url=document.location.href,data={'cffaction':'cff_cache','cache':form_tag.html().replace(/\n+/g,''),'form':form_tag.find('[name="cp_calculatedfieldsf_id"]').val()};$.post(url,data,function(data){if(typeof console!='undefined')console.log(data);});} jQuery(document).on('click','.cff-help-icon',function(evt){evt.stopPropagation();evt.preventDefault();});$(document).on('click','#fbuilder .captcha img',function(){try{var e=$(this),src=e.attr('src');if(!(new RegExp('^http(s)?\:\/\/'+$.fbuilder.escapeSymbol(window.location.host),'i')).test(src))src=document.location.href.split('?')[0]+'?'+src.split('?')[1];e.attr('src',src.replace(/&\d+$/,'')+'&'+Math.floor(Math.random()*1000));}catch(err){if('console'in window)console.log(err);}});$(form_tag).find('.captcha img').click();$('#fieldlist'+opt.identifier).find(".pbSubmit").bind("keyup",function(evt){if(evt.which==13||evt.which==32)$(this).click();}).bind("click",{'identifier':opt.identifier},function(evt){$(this).closest("form").submit();});if(i>0){theForm.after_show(opt.identifier);for(var i=0;i'+(!/^\s*$/.test(this.title)?'

'+this.title+'

':'')+(!/^\s*$/.test(this.description)?''+this.description+'':'')+'
';},after_show:function(id){if(typeof $['validator']!='undefined'){if(!('cffcurrency'in $.validator.methods)) $.validator.addMethod('cffcurrency',function(v,el){var f=el.id.match(/_\d+$/),esc=$.fbuilder.escapeSymbol,r;e=$.fbuilder['forms'][f[0]].getItem(el.name);r=new RegExp('^\\s*('+esc(e.currencySymbol)+')?\\s*\\-?\\d+('+esc(e.thousandSeparator)+'\\d{3})*'+((e.noCents)?'':'('+e.centSeparator+'\\d+)?')+'\\s*('+esc(e.currencyText)+')?\\s*$','i');return this.optional(el)||r.test(v)||($.isNumeric(v)&&(!e.noCents||v===FLOOR(v)));},$.validator.messages['currency']);$.validator.methods.number=function(v,el){var f=el.id.match(/_\d+$/),esc=$.fbuilder.escapeSymbol,e,r;if(f&&el.id.match(/fieldname/i))e=$.fbuilder['forms'][f[0]].getItem(el.name);if(!e)e={thousandSeparator:',',decimalSymbol:'.'};else v=e.val();r=new RegExp('^\\s*\\-?\\d+('+esc(e.thousandSeparator)+'\\d{3})*('+esc(e.decimalSymbol)+'\\d+)?\\s*\\%?\\s*$','i');return this.optional(el)||r.test(v)||$.isNumeric(v);};$.validator.methods.min=function(v,el,p){var f=el.id.match(/_\d+$/),e;if(f&&el.id.match(/fieldname/i))e=$.fbuilder['forms'][f[0]].getItem(el.name);if(e){v=e.val();if('dformat'in e&&e.dformat=='percent')v*=100;} return this.optional(el)||v>=p;};$.validator.methods.max=function(v,el,p){var f=el.id.match(/_\d+$/),e;if(f&&el.id.match(/fieldname/i))e=$.fbuilder['forms'][f[0]].getItem(el.name);if(e){v=e.val();if('dformat'in e&&e.dformat=='percent')v*=100;} return this.optional(el)||v<=p;};} var form=$('#cp_calculatedfieldsf_pform'+id);form.on('keydown keyup keypress','[type="text"],[type="number"],[type="password"],[type="email"]',function(evt){if(evt.keyCode===13){evt.preventDefault();evt.stopPropagation();return false;}});if(typeof $.fn.fbuilder_localstorage!='undefined'&&form.hasClass('persist-form')){form.fbuilder_localstorage();} form.attr('data-evalequations',('evalequations_delay'in this&&this.evalequations_delay)?0:this.evalequations).attr('data-evalequationsevent',this.evalequationsevent).attr('data-animate_form',this.animate_form).attr('data-animation_effect',this.animation_effect).attr('autocomplete',((this.autocomplete)?'on':'off')).one('formReady',(function(evalequations){return function(){$(this).attr('data-evalequations',evalequations);if(evalequations)fbuilderjQuery.fbuilder.calculator.defaultCalc(this,false,false);};})(this.evalequations)).find('input,select').blur(function(){try{if(!$(this).is(':file'))$(this).valid();}catch(e){};});if(!this.autocomplete)form.find('input[name*="fieldname"]:not([autocomplete])').attr('autocomplete','new-password');}});var theForm,ffunct={toShow:{},toHide:{},hiddenByContainer:{},getItem:function(name){if(name in fieldsIndex)return items[fieldsIndex[name]];var regExp=new RegExp((parseInt(name,10)==name)?'fieldname'+name+'_':name+'_',i);for(var i in items){if(items[i].name==name||regExp.test(items[i].name)){return items[i];}} return false;},getItems:function(){return items;},loadData:function(f){var d=window[f];if(typeof d!='undefined'){if(typeof d=='object'&&(typeof d.nodeType!=='undefined'||d instanceof jQuery)){d=jQuery.parseJSON(jQuery(d).val());} else if(typeof d=='string'){d=jQuery.parseJSON(d);} if(d.length==2){this.formId=d[1]['formid'];items=[];for(var i=0;i
'+this.userhelp+'
';},after_show:function(){if(this.regExp!=""&&typeof $['validator']!='undefined'){try{var parts=this.regExp.match(/(\/)(.*)(\/)([gimy]{0,4})$/i);this.regExp=(parts===null)?new RegExp(this.regExp):new RegExp(parts[2],parts[4].toLowerCase());if(!('pattern'in $.validator.methods)) $.validator.addMethod('pattern',function(value,element,param){try{return this.optional(element)||param.test(value);} catch(err){return true;}});$('#'+this.name).rules('add',{'pattern':this.regExp,messages:{'pattern':this.regExpMssg}});}catch(err){}}},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var e=$('[id="'+this.name+'"]:not(.ignore)'),v;if(e.length){v=$.fbuilder.parseValStr(e.val(),raw,no_quotes);return(raw&&!no_quotes&&!isNaN(v))?'"'+v+'"':v;} return 0;}});$.fbuilder.controls['fcurrency']=function(){};$.extend($.fbuilder.controls['fcurrency'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Currency",ftype:"fcurrency",predefined:"",predefinedClick:false,required:false,readonly:false,numberpad:false,spinner:false,size:"small",currencySymbol:"$",currencyText:"USD",thousandSeparator:",",centSeparator:".",noCents:false,min:"",max:"",step:1,formatDynamically:false,twoDecimals:false,set_step:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('step');else{var vb=e.val();e.removeAttr('value');if(!isNaN(v*1))e.attr('step',Math.abs(v*1?v:1));e.val(vb);} if(!e.hasClass('cpefb_error'))e.removeClass('required');e.valid();if(this.required)e.addClass('required');},set_min:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('min');else e.attr('min',v);if(!e.hasClass('cpefb_error'))e.removeClass('required');e.valid();if(this.required)e.addClass('required');},set_max:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('max');else e.attr('max',v);if(!e.hasClass('cpefb_error'))e.removeClass('required');e.valid();if(this.required)e.addClass('required');},getFormattedValue:function(value){if(value=='')return value;var me=this,ts=me.thousandSeparator,cs=((cs=$.trim(me.centSeparator))!=='')?cs:'.',v=$.fbuilder.parseVal(value,ts,cs),parts=[],counter=0,str='',sign='';if(!isNaN(v)){if(v<0)sign='-';v=ABS(v);if(this.twoDecimals)v=v.toFixed(2);parts=v.toString().split(".");for(var i=parts[0].length-1;i>=0;i--){counter++;str=parts[0][i]+str;if(counter%3==0&&i!=0)str=ts+str;} parts[0]=str;if(parts[1]){if(parts[1].length==1)parts[1]+='0';} else parts[1]='00';return me.currencySymbol+sign+((me.noCents)?parts[0]:parts.join(cs))+me.currencyText;}else{return value;}},init:function(){if(!/^\s*$/.test(this.min))this._setHndl('min');if(!/^\s*$/.test(this.max))this._setHndl('max');if(!/^\s*$/.test(this.step))this._setHndl('step');else this.step=1;},show:function(){this.predefined=this._getAttr('predefined');return'
'+ (this.spinner?'
':'')+''+ (this.spinner?'
':'')+''+this.userhelp+'
';},after_show:function(){var me=this;if(this.formatDynamically){$(document).on('change','[name="'+me.name+'"]',function(){this.value=me.getFormattedValue(this.value);});} $('#'+me.name).rules('add',{'step':false});},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length){var v=e.val();if(raw)return($.isNumeric(v))?v:$.fbuilder.parseValStr(v,raw,no_quotes);v=$.trim(v);v=v.replace(new RegExp($.fbuilder['escapeSymbol'](this.currencySymbol),'g'),'').replace(new RegExp($.fbuilder['escapeSymbol'](this.currencyText),'g'),'');return $.fbuilder.parseVal(v,this.thousandSeparator,this.centSeparator,no_quotes);} return 0;}});$.fbuilder.controls['fnumber']=function(){};$.extend($.fbuilder.controls['fnumber'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Number",ftype:"fnumber",predefined:"",predefinedClick:false,required:false,readonly:false,numberpad:false,spinner:false,size:"small",prefix:"",postfix:"",thousandSeparator:"",decimalSymbol:".",min:"",max:"",step:1,formatDynamically:false,dformat:"digits",set_step:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('step');else{var vb=e.val();e.removeAttr('value');if(!isNaN(v*1))e.attr('step',Math.abs(v*1?v:1));e.val(vb);} if(!e.hasClass('cpefb_error'))e.removeClass('required');e.valid();if(this.required)e.addClass('required');},set_min:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('min');else e.attr('min',v);if(!e.hasClass('cpefb_error'))e.removeClass('required');e.valid();if(this.required)e.addClass('required');},set_max:function(v,rmv){var e=$('[id="'+this.name+'"]');if(rmv)e.removeAttr('max');else e.attr('max',v);if(!e.hasClass('cpefb_error'))e.removeClass('required');e.valid();if(this.required)e.addClass('required');},getFormattedValue:function(value){if(value=='')return value;var ts=this.thousandSeparator,ds=((ds=$.trim(this.decimalSymbol))!=='')?ds:'.',v=$.fbuilder.parseVal(value,ts,ds),s='',counter=0,str='',parts=[],step=$('[id="'+this.name+'"]').attr('step'),prefix=this.dformat=='number'?this.prefix:'',postfix=this.dformat=='number'?this.postfix:'';if(!isNaN(v)){if(v<0)s='-';v=ABS(v);parts=v.toString().split(".");for(var i=parts[0].length-1;i>=0;i--){counter++;str=parts[0][i]+str;if(counter%3==0&&i!=0)str=ts+str;} parts[0]=str;if(typeof parts[1]!='undefined'&&parts[1]*1&&typeof step!='undefined'&&!isNaN(step*1)){var l=(new String(step)).split('.');if(l.length==2){l=Math.max(l.length-(new String(parts[1])).length,0);for(var i=0;i
'+ (this.spinner?'
':'')+''+ (this.spinner?'
':'')+''+this.userhelp+'
';},after_show:function(){var me=this;if((me.formatDynamically&&me.dformat!='digits')||me.dformat=='percent'){$(document).on('change','[name="'+me.name+'"]',function(){this.value=me.getFormattedValue(this.value);});} $('#'+me.name).rules('add',{'step':false});},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length){var v=$.trim(e.val());if(raw)return($.isNumeric(v)&&this.thousandSeparator!='.')?v:$.fbuilder.parseValStr(v,raw,no_quotes);v=v.replace(new RegExp($.fbuilder['escapeSymbol'](this.prefix),'g'),'').replace(new RegExp($.fbuilder['escapeSymbol'](this.postfix),'g'),'');v=$.fbuilder.parseVal(v,this.thousandSeparator,this.decimalSymbol,no_quotes);return(this.dformat=='percent')?v/100:v;} return 0;}});$.fbuilder.controls['fslider']=function(){};$.extend($.fbuilder.controls['fslider'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Slider",ftype:"fslider",exclude:false,readonly:false,predefined:"",predefinedMin:"",predefinedMax:"",predefinedClick:false,size:"small",thousandSeparator:",",centSeparator:".",typeValues:false,min:0,max:100,step:1,marks:false,divisions:5,range:false,logarithmic:false,minCaption:"",maxCaption:"",caption:"{0}",_expon:function(v){if(v==0)return v;var el=$('#'+this.name+'_slider'),step=this.calc_step,min=Math.max(el.slider('option','min'),step),max=FLOOR(el.slider('option','max')/step)*step,minv=Math.log(Math.max(min,0.01)),maxv=Math.log(max),scale=(maxv-minv)/(max-min);return ROUND(Math.exp(minv+scale*(v-min)),step);},_inverse:function(v){var el=$('#'+this.name+'_slider'),step=this.calc_step,min=Math.max(el.slider('option','min'),step),max=FLOOR(el.slider('option','max')/step)*step,minv=Math.log(Math.max(min,0.1)),maxv=Math.log(max),scale=(maxv-minv)/(max-min);return ROUND(((Math.log(v)-minv)/scale+min),step);},_setThousandsSeparator:function(v){let l=(new String(this.step)).split('.');l=l.length==2?l[1].length:0;v=$.fbuilder.parseVal(v,this.thousandSeparator,this.centSeparator);if(!isNaN(v)){v=PREC(v,l);var parts=v.toString().split("."),counter=0,str='';for(var i=parts[0].length-1;i>=0;i--){counter++;str=parts[0][i]+str;if(counter%3==0&&i!=0)str=this.thousandSeparator+str;} parts[0]=str;return parts.join(this.centSeparator);}else{return v;}},_setFieldValue:function(val,nochange){var me=this;if(me.range){var values=(typeof val!='undefined'&&val!==null)?val:$('#'+me.name+'_slider').slider('values'),vl=values[0],vr=values[1],vlf=me._setThousandsSeparator(vl),vrf=me._setThousandsSeparator(vr);$('.'+me.name).find('.cff-slider-tooltip-value').first().html(vlf);$('.'+me.name).find('.cff-slider-tooltip-value').last().html(vrf);$('#'+me.name+'_component_left').val(vlf);$('#'+me.name+'_component_right').val(vrf);$('#'+me.name).val('['+vl+','+vr+']').attr('vt','['+vlf+','+vrf+']');$('#'+me.name+'_caption').html(me.caption.replace(/\{\s*0\s*\}/,vlf).replace(/\{\s*0\s*\}/,vrf));}else{var v=(typeof val!='undefined'&&val!==null)?val:$('#'+me.name+'_slider').slider('value'),vf=me._setThousandsSeparator(v);$('.'+me.name).find('.cff-slider-tooltip-value').first().html(vf);$('#'+me.name).val(v).attr('vt',vf);$('#'+me.name+'_component_center').val(vf);$('#'+me.name+'_caption').html(me.caption.replace(/\{\s*0\s*\}/g,vf));} if(!nochange)$('#'+me.name).change();},_toNumber:function(n){return(new String(n)).replace(/[^\-\d\.]/g,'')*1;},init:function(){this.min=(/^\s*$/.test(this.min))?0:$.trim(this.min);this.max=(/^\s*$/.test(this.max))?100:$.trim(this.max);this.step=(/^\s*$/.test(this.step))?1:$.trim(this.step);this.predefinedMin=(/^\s*$/.test(this.predefinedMin))?this.min:$.trim(this.predefinedMin);this.predefinedMax=(/^\s*$/.test(this.predefinedMax))?this.max:$.trim(this.predefinedMax);this._setHndl('min');this._setHndl('max');this._setHndl('step');this._setHndl('predefinedMin');this._setHndl('predefinedMax');this.centSeparator=(/^\s*$/.test(this.centSeparator))?'.':$.trim(this.centSeparator);if(this.logarithmic&&!isNaN(this.step)){this.calc_step=this.step;this.step=Math.min(this.step,1);}},show:function(){var me=this;function typeValuesComponents(){function component(c){var min=cff_esc_attr(me.min),max=cff_esc_attr(me.max),step=cff_esc_attr(me.step),predefined=cff_esc_attr((c=='left')?me.predefinedMin:((c=='right')?me.predefinedMax:me.predefined)),timeoutId;$(document).on('keyup change','#'+me.name+'_component_'+c,function(evt){function stepRound(v){var _e=$('#'+me.name+'_slider'),_max=_e.slider('option','max'),_step=_e.slider('option','step');return MIN(CEIL(v,_step),_max);};var v=$('#'+me.name+'_component_center').val(),v1=$('#'+me.name+'_component_left').val(),v2=$('#'+me.name+'_component_right').val(),t=0;clearTimeout(timeoutId);if(evt.type=='keyup')t=2500;timeoutId=setTimeout(function(){if(v!=undefined){v=$.fbuilder.parseVal(v,me.thousandSeparator,me.centSeparator);if(isNaN(v))v=0;} if(v1!=undefined){v1=$.fbuilder.parseVal(v1,me.thousandSeparator,me.centSeparator);if(isNaN(v1))v1=0;} if(v2!=undefined){v2=$.fbuilder.parseVal(v2,me.thousandSeparator,me.centSeparator);if(isNaN(v2))v2=0;} $('#'+me.name+'_slider').slider(((v!=undefined)?'value':'values'),((v!=undefined)?(me.logarithmic?me._inverse(v*1):stepRound(v*1)):[stepRound(Math.min(v1*1,v2*1)),stepRound(Math.max(v1*1,v2*1))]));me._setFieldValue(me.logarithmic?v:null);},t);});return'
';};var str='';if(me.typeValues) str+='
'+ ((me.range)?component('left')+component('right'):component('center'))+'
';return str;};me.predefined=(/^\s*$/.test(me.predefined))?me.min:me._toNumber(me._getAttr('predefined'));return'
'+''+'
'+ typeValuesComponents()+''+'
'+'
'+''+me.minCaption+''+''+me.maxCaption+''+'
'+'
'+'
'+''+me.userhelp+''+'
'+'
'+'
';},set_min:function(v,ignore){try{var e=$('[id="'+this.name+'_slider"]'),c=this.val(),r=false;if(ignore)v=0;e.slider('option','min',v);if($.isArray(c)){if(c[0]');}}}}catch(err){}},after_show:function(){var me=this,opt={range:(me.range!=false)?me.range:"min",min:me._getAttr('min'),max:me._getAttr('max'),step:me._getAttr('step')};me.set_min_caption(opt.min);me.set_max_caption(opt.max);if(me.range){var _min=Math.min(Math.max(me._getAttr('predefinedMin'),opt.min),opt.max),_max=Math.min(Math.max(me._getAttr('predefinedMax'),opt.min),opt.max);opt['values']=[_min,_max];} else opt['value']=Math.min(Math.max(me._getAttr('predefined'),opt.min),opt.max);opt['disabled']=me.readonly;opt['slide']=opt['stop']=(function(e){return function(event,ui){var v=(typeof ui.value!='undefined')?ui.value:ui.values;if(me.logarithmic){v=me._expon(v);e._setFieldValue(v);}else{$(this).slider(Array.isArray(v)?'values':'value',v);e._setFieldValue();}}})(me);$('#'+this.name+'_slider').slider(opt);$('#'+this.name+'_slider').find('.ui-slider-handle').each(function(){$(this).append('
'+'
'+'
'+'
');});me._setFieldValue();$('#cp_calculatedfieldsf_pform'+me.form_identifier).bind('reset',function(){setTimeout(function(){$('#'+me.name+'_slider').slider(opt);me._setFieldValue();},20);});try{var divisions=parseInt(me.divisions);me.set_marks(me.marks,(isNaN(divisions)||!divisions)?(me.max-me.min)/me.step:divisions);}catch(err){}},val:function(raw){try{raw=raw||false;var e=$('[id="'+this.name+'"]:not(.ignore)');return(e.length)?((raw)?e.val():JSON.parse(e.val())):0;} catch(err){return 0;}},setVal:function(v,nochange){try{v=JSON.parse(v);}catch(err){} try{$('[name="'+this.name+'"]').val(v);$('#'+this.name+'_slider').slider((($.isArray(v))?'values':'value'),(this.logarithmic?this._inverse(v):v));this._setFieldValue(v,nochange);}catch(err){}}});$.fbuilder.controls['fcolor']=function(){};$.extend($.fbuilder.controls['fcolor'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Untitled",ftype:"fcolor",predefined:"",predefinedClick:false,required:false,readonly:false,size:"medium",show:function(){this.predefined=this._getAttr('predefined');return'
'+this.userhelp+'
';},after_show:function(){},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length)return $.fbuilder.parseValStr(e.val(),raw,no_quotes);return 0;}});$.fbuilder.controls['femail']=function(){};$.extend($.fbuilder.controls['femail'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Email",ftype:"femail",autocomplete:"off",predefined:"",predefinedClick:false,required:false,readonly:false,size:"medium",equalTo:"",regExp:"",regExpMssg:"",show:function(){this.predefined=this._getAttr('predefined');return'
'+this.userhelp+'
';},after_show:function(){if(this.regExp!=""&&typeof $['validator']!='undefined'){try{var parts=this.regExp.match(/(\/)(.*)(\/)([gimy]{0,4})$/i);this.regExp=(parts===null)?new RegExp(this.regExp):new RegExp(parts[2],parts[4].toLowerCase());if(!('pattern'in $.validator.methods)) $.validator.addMethod('pattern',function(value,element,param){try{return this.optional(element)||param.test(value);} catch(err){return true;}});$('#'+this.name).rules('add',{'pattern':this.regExp,messages:{'pattern':this.regExpMssg}});}catch(err){}}},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length)return $.fbuilder.parseValStr(e.val(),raw,no_quotes);return 0;}});$.fbuilder.controls['fdate']=function(){};$.extend($.fbuilder.controls['fdate'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Date",ftype:"fdate",predefined:"",predefinedClick:false,size:"medium",required:false,readonly:false,disableKeyboardOnMobile:false,showDatepicker:true,dformat:"mm/dd/yyyy",dseparator:"/",showDropdown:false,dropdownRange:"-10:+10",invalidDates:"",mondayFirstDay:false,working_dates:[true,true,true,true,true,true,true],minDate:"",maxDate:"",defaultDate:"",showTimepicker:false,tformat:"24",minHour:0,maxHour:23,minMinute:0,maxMinute:59,stepHour:1,stepMinute:1,defaultTime:"",ariaHourLabel:'hours',ariaMinuteLabel:'minutes',ariaAMPMLabel:'am or pm',errorMssg:'',_get_regexp:function(){var me=this,df=me.dformat.replace(new RegExp('\\'+me.dseparator,'g'),'/'),rt;if(/^y/i.test(df))rt='(\\d{4})[^\\d](\\d{1,2})[^\\d](\\d{1,2})';else rt='(\\d{1,2})[\\/\\-\\.](\\d{1,2})[\\/\\-\\.](\\d{4})';return{d:df,r:rt};},_set_Events:function(){var me=this,f=function(){me.set_dateTime();$('#'+me.name+'_date').valid();};$(document).off('change','#'+me.name+'_date').on('change','#'+me.name+'_date',function(){f();});$(document).off('change','#'+me.name+'_hours').on('change','#'+me.name+'_hours',function(){f();});$(document).off('change','#'+me.name+'_minutes').on('change','#'+me.name+'_minutes',function(){f();});$(document).off('change','#'+me.name+'_ampm').on('change','#'+me.name+'_ampm',function(){f();});$('#cp_calculatedfieldsf_pform'+me.form_identifier).bind('reset',function(){setTimeout(function(){me.set_DefaultDate(true);me.set_DefaultTime();me.set_dateTime();},500);});},_validateDate:function(d){try{var e=this,w=e.working_dates,i=e.invalidDates,n=$('#'+e.name+'_date');d=d||n.datepicker('getDate');if(d===null||!w[d.getDay()])return false;if(i!==null){for(var j=0,h=i.length;j'+h+'';i++;} return':';},get_minutes:function(){var me=this,str='',i=0,m,n=(me.minHour==me.maxHour)?me.minMinute:0,x=(me.minHour==me.maxHour)?me.maxMinute:59;while((m=n+me.stepMinute*i)<=x){if(m<10)m='0'+''+m;str+='';i++;} return'';},get_ampm:function(){var str='';if(this.tformat==12){return'';} return str;},set_dateTime:function(nochange){var me=this,str=$('#'+me.name+'_date').val(),e=$('#'+me.name);if(me.showTimepicker){str+=' '+$('#'+me.name+'_hours').val();str+=':'+$('#'+me.name+'_minutes').val();if($('#'+me.name+'_ampm').length)str+=$('#'+me.name+'_ampm').val();} e.val(str);if(!nochange)e.change();},set_minDate:function(v,ignore){var e=$('[id*="'+this.name+'"].hasDatepicker');if(e.length){e.datepicker('option','minDate',(ignore)?null:v);e.change();}},set_maxDate:function(v,ignore){var e=$('[id*="'+this.name+'"].hasDatepicker');if(e.length){e.datepicker('option','maxDate',(ignore)?null:v);e.change();}},set_DefaultDate:function(init){var me=this,p={dateFormat:me.dformat.replace(/yyyy/g,"yy"),minDate:me._getAttr('minDate'),maxDate:me._getAttr('maxDate'),firstDay:(me.mondayFirstDay?1:0),disabled:me.readonly},dp=$("#"+me.name+"_date"),dd=(me.defaultDate!="")?me.defaultDate:((me.predefined!="")?me.predefined:new Date());dp.click(function(){$(document).click();$(this).focus();});if(me.showDropdown)p=$.extend(p,{changeMonth:true,changeYear:true,yearRange:me.dropdownRange});p=$.extend(p,{beforeShowDay:function(d){return[me._validateDate(d),""];}});if(me.defaultDate!="")p.defaultDate=me.defaultDate;dp.datepicker(p);if(!me.predefinedClick||!!init==false)dp.datepicker("setDate",dd);if(!me._validateDate())dp.datepicker("setDate",'');},set_DefaultTime:function(){var me=this,_setValue=function(f,v,m){v=Math.min(v*1,m*1);v=(v<10)?0+''+v:v;$('#'+f+' [value="'+v+'"]').prop('selected',true);};if(me.showTimepicker){var parts,time={},tmp=0,max_minutes=59;if((parts=/(\d{1,2}):(\d{1,2})\s*([ap]m)?/gi.exec(me.defaultTime))!=null){time['hour']=parts[1]*1+((parts.length==4&&/pm/i.test(parts[3])&&parts[1]!=12)?12:0);time['minute']=parts[2];}else{var d=new Date();time['hour']=d.getHours();time['minute']=d.getMinutes();} time['hour']=Math.min(Math.max(time['hour'],me.minHour),me.maxHour);if(time['hour']<=me.minHour)time['minute']=Math.max(time['minute'],me.minMinute);if(me.maxHour<=time['hour'])time['minute']=Math.min(time['minute'],me.maxMinute);_setValue(me.name+'_hours',(me.tformat==12)?((time['hour']>12)?time['hour']-12:((time['hour']==0)?12:time['hour'])):time['hour'],(me.tformat==12)?12:me.maxHour);_setValue(me.name+'_minutes',time['minute'],(time['hour']==me.maxHour)?me.maxMinute:59);$('#'+me.name+'_ampm'+' [value="'+((time['hour']<12)?'am':'pm')+'"]').prop('selected',true);}},show:function(){var me=this,n=me.name,attr='value',format_label=[],date_tag_type='text',disabled='',date_tag_class='field date'+me.dformat.replace(/[^a-z]/ig,"")+' '+me.size+((me.required&&me.showDatepicker)?' required':'');if(me.predefinedClick)attr='placeholder';if(me.showDatepicker)format_label.push(me.dformat);else{date_tag_type='hidden';disabled='disabled';} if(me.showTimepicker)format_label.push('HH:mm');this.predefined=this._getAttr('predefined');return'
'+((me.showTimepicker)?' '+me.get_hours()+me.get_minutes()+' '+me.get_ampm():'')+''+me.userhelp+'
';},after_show:function(){var me=this,date_format='date'+me.dformat.replace(/[^a-z]/ig,""),validator=function(v,e){try {var p=e.name.replace('_date','').split('_'),i=$.fbuilder.forms['_'+p[1]].getItem(p[0]),o=me._get_regexp(),d=$(e).datepicker('getDate');if(i!=null)return this.optional(e)||(i._validateDate()&&(new RegExp(o.r)).test(v)&&i._validateTime()&&DATEOBJ(v,me.dformat).getTime()==d.getTime());return true;} catch(er){return false;}};if(!(date_format in $.validator.methods))$.validator.addMethod(date_format,validator);me.set_DefaultDate(true);me.set_DefaultTime();me._set_Events();me.set_dateTime();},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var me=this,e=$('[id="'+me.name+'"]:not(.ignore)'),o=me._get_regexp();if(e.length){var v=e.val();if(raw)return $.fbuilder.parseValStr(v,raw,no_quotes);v=$.trim(e.val());var re=new RegExp('('+o.r+')?(\\s*(\\d{1,2})[:\\.](\\d{1,2})\\s*([amp]{2})?)?'),d=re.exec(v),h=0,m=0,date;if(d){if(typeof d[6]!='undefined')h=d[6]*1;if(typeof d[7]!='undefined')m=d[7]*1;if(typeof d[8]!='undefined'){var am=d[8].toLowerCase();if(am=='pm'&&h<12)h+=12;if(am=='am'&&h==12)h-=12;} switch(o.d){case'yyyy/dd/mm':date=new Date(d[2],(d[4]*1-1),d[3],h,m,0,0);break;case'yyyy/mm/dd':date=new Date(d[2],(d[3]*1-1),d[4],h,m,0,0);break;case'dd/mm/yyyy':date=new Date(d[4],(d[3]*1-1),d[2],h,m,0,0);break;case'mm/dd/yyyy':date=new Date(d[4],(d[2]*1-1),d[3],h,m,0,0);break;} if(isFinite(date)){if(me.showTimepicker)return date.valueOf()/86400000;else return Math.ceil(date.valueOf()/86400000);} else if(!me.showDatepicker&&me.showTimepicker) return(h*3600000+m*60000)/86400000;}} return 0;},setVal:function(v,nochange,init){init=init||false;try {v=$.trim(v).replace(/\s+/g,' ').split(' ');if(this.showDatepicker){this.defaultDate=v[0];this.set_DefaultDate(init&&!this.defaultDate.length);} if(this.showTimepicker){var t=(v.length==2)?v[1]:((!this.showDatepicker)?v[0]:false);if(t!==false){this.defaultTime=t;this.set_DefaultTime();}} this.set_dateTime(nochange);} catch(err){}}});$.fbuilder.controls['ftextarea']=function(){};$.extend($.fbuilder.controls['ftextarea'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Untitled",ftype:"ftextarea",autocomplete:"off",predefined:"",predefinedClick:false,required:false,readonly:false,size:"medium",minlength:"",maxlength:"",rows:4,show:function(){this.minlength=cff_esc_attr($.trim(this.minlength));this.maxlength=cff_esc_attr($.trim(this.maxlength));this.predefined=this._getAttr('predefined');return'
'+this.userhelp+'
';},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length){var v=$.fbuilder.parseValStr(e.val(),raw,no_quotes);if(!raw)v=v.replace(/[\n\r]+/g,' ');else if(!no_quotes)v=v.replace(/^"/,"`").replace(/"$/,"`");return v;} return 0;}});$.fbuilder.controls['fcheck']=function(){};$.extend($.fbuilder.controls['fcheck'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Check All That Apply",ftype:"fcheck",layout:"one_column",required:false,readonly:false,merge:1,onoff:0,max:-1,maxError:"Check no more than {0} boxes",toSubmit:"text",showDep:false,show:function(){this.choicesVal=((typeof(this.choicesVal)!="undefined"&&this.choicesVal!==null)?this.choicesVal:this.choices);var str="",classDep,n=this.name.match(/fieldname\d+/)[0];if(typeof this.choicesDep=="undefined"||this.choicesDep==null) this.choicesDep=new Array();for(var i=0,h=this.choices.length;i';} return'
'+str+'
'+(!this.userhelpTooltip?''+this.userhelp+'':'')+'
';},enable_disable:function(){var m=this;if(0-1;}));}},getIndex:function(){var i=[];$('[name*="'+this.name+'"]').each(function(j,v){if(this.checked){i.push(j);}});return i;}});$.fbuilder.controls['fradio']=function(){};$.extend($.fbuilder.controls['fradio'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Select a Choice",ftype:"fradio",layout:"one_column",required:false,readonly:false,onoff:0,toSubmit:"text",choiceSelected:"",showDep:false,untickAccepted:true,initStatus:function(){$('[id*="'+this.name+'_"]').each(function(){$(this).data('previous-status',this.checked);});},show:function(){this.choicesVal=((typeof(this.choicesVal)!="undefined"&&this.choicesVal!==null)?this.choicesVal:this.choices);var l=this.choices.length,str="",classDep="",n=this.name.match(/fieldname\d+/)[0];if(typeof this.choicesDep=="undefined"||this.choicesDep==null) this.choicesDep=new Array();for(var i=0;i';} return'
'+str+'
'+(!this.userhelpTooltip?''+this.userhelp+'':'')+'
';},after_show:function(){var me=this,n=me.name;me.initStatus();if(me.untickAccepted){$(document).off('click','[id*="'+n+'_"]').on('click','[id*="'+n+'_"]',function(){var m=this,e=$(m);$('[id*="'+n+'_"]').each(function(){if(m!==this)$(this).data('previous-status',false);});if(e.data('previous-status')){m.checked=false;e.change();} e.data('previous-status',m.checked);});}},showHideDep:function(toShow,toHide,hiddenByContainer,interval){if(typeof hiddenByContainer=='undefined')hiddenByContainer={};var me=this,item=$('input[id*="'+me.name+'"]'),form_identifier=me.form_identifier,isHidden=(typeof toHide[me.name]!='undefined'||typeof hiddenByContainer[me.name]!='undefined'),result=[];try {item.each(function(i,e){if(typeof me.choicesDep[i]!='undefined'&&me.choicesDep[i].length){var checked=e.checked;for(var j=0,k=me.choicesDep[i].length;j-1);}},getIndex:function(){var i=-1;$('[name*="'+this.name+'"]').each(function(j,v){if(this.checked){i=j;return false;}});return i;}});$.fbuilder.controls['fdropdown']=function(){};$.extend($.fbuilder.controls['fdropdown'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Select a Choice",ftype:"fdropdown",size:"medium",required:false,toSubmit:"text",merge:0,choiceSelected:"",select2:false,multiple:false,vChoices:1,showDep:false,show:function(){this.choicesVal=((typeof(this.choicesVal)!="undefined"&&this.choicesVal!==null)?this.choicesVal:this.choices) var c=this.choices,cv=this.choicesVal,og=(typeof this.optgroup=='undefined')?new Array():this.optgroup,op_o=false,l=c.length,classDep='',str='',n=this.name.match(/fieldname\d+/)[0];if(typeof this.choicesDep=="undefined"||this.choicesDep==null) this.choicesDep=new Array();for(var i=0;i';str+='';op_o=true;}else{str+='';}} if(op_o)str+='';return'
'+'
'+this.userhelp+'
';},after_show:function(){var me=this;if(me.select2){function formatState(state){return!state.id?state.text:$(''+state.text+'');};$('#'+me.name).after('');$('#'+me.name).on('change',function(){$(this).valid();});if('select2'in $.fn) $('#'+me.name).select2({'templateResult':formatState,'templateSelection':formatState,'dropdownParent':$('#'+me.name).next('.cff-select2-container')});else $(document).ready(function(){if('select2'in $.fn)$('#'+me.name).select2({'dropdownParent':$('#'+me.name).next('.cff-select2-container')});});}},showHideDep:function(toShow,toHide,hiddenByContainer,interval){if(typeof hiddenByContainer=='undefined')hiddenByContainer={};var me=this,item=$('#'+me.name+'.depItemSel'),form_identifier=me.form_identifier,isHidden=(typeof toHide[me.name]!='undefined'||typeof hiddenByContainer[me.name]!='undefined'),result=[];try {if(item.length){var selected=[];$(item).find(':selected').each(function(){selected.push($(this).data('i'));});for(var i=0,h=me.choices.length;i-1;}));}},getIndex:function(){var f=$('[name*="'+this.name+'"]');if(this.multiple){var i=[];f.find('option').each(function(j,v){if(this.selected)i.push(j);});return i;} else return f[0].selectedIndex;}});$.fbuilder.controls['ffile']=function(){};$.extend($.fbuilder.controls['ffile'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Untitled",ftype:"ffile",required:false,size:"medium",accept:"",upload_size:"",multiple:false,preview:false,thumb_width:'80px',thumb_height:'',_patch:false,init:function(){this.thumb_width=$.trim(this.thumb_width);this.thumb_height=$.trim(this.thumb_height);var form_identifier=this.form_identifier.replace(/[^\d]/g,'');this._patch=('cpcff_default'in window&&form_identifier in cpcff_default)?true:false;},show:function(){this.accept=cff_esc_attr($.trim(this.accept));this.upload_size=cff_esc_attr($.trim(this.upload_size));return'
'+((this._patch)?'':'')+''+this.userhelp+'
';},after_show:function(){var me=this;if(!('accept'in $.validator.methods)) $.validator.addMethod("accept",function(value,element,param){if(this.optional(element))return true;else{param=typeof param==="string"?param.replace(/,/g,'|'):"png|jpe?g|gif";var regExpObj=new RegExp(".("+param+")$","i");for(var i=0,h=element.files.length;i');for(var i=0;i');img.attr('src',e.target.result).css('maxWidth','100%');if(me.thumb_height!='')img.attr('height',me.thumb_height);if(me.thumb_width!='')img.attr('width',me.thumb_width);filesContainer.append($(''+(n?', ':'')+'').append(img));n++;};reader.readAsDataURL(file);} else if(1').text((n?', ':'')+file.name));n++;}})(i,this.files[i]);} $('#'+this.id+'_clearer').after(filesContainer);}});$('#'+me.name+'_clearer').click(function(){$('#'+me.name).val('').change().valid();});},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var e=$("[id='"+this.name+"']:not(.ignore)"),result='',separator='';if(e.length){if(raw)result=e[0].files;else {for(var i=0,h=e[0].files.length;i
'+this.userhelp+'
';},after_show:function(){if(this.regExp!=""&&typeof $['validator']!='undefined'){try{var parts=this.regExp.match(/(\/)(.*)(\/)([gimy]{0,4})$/i);this.regExp=(parts===null)?new RegExp(this.regExp):new RegExp(parts[2],parts[4].toLowerCase());if(!('pattern'in $.validator.methods)) $.validator.addMethod('pattern',function(value,element,param){try{return this.optional(element)||param.test(value);} catch(err){return true;}});$('#'+this.name).rules('add',{'pattern':this.regExp,messages:{'pattern':this.regExpMssg}});}catch(err){}}},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length)return $.fbuilder.parseValStr(e.val(),raw,no_quotes);return 0;}});$.fbuilder.controls['fPhone']=function(){};$.extend($.fbuilder.controls['fPhone'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Phone",ftype:"fPhone",required:false,readonly:false,size:"medium",dformat:"### ### ####",predefined:"888 888 8888",countryComponent:false,toDisplay:'iso',countries:[],defaultCountry:'',show:function(){var me=this,db={"AF":"+93","AX":"+358","AL":"+355","DZ":"+213","AS":"+1684","AD":"+376","AO":"+244","AI":"+1264","AQ":"+672","AG":"+1268","AR":"+54","AM":"+374","AW":"+297","AU":"+61","AT":"+43","AZ":"+994","BS":"+1242","BH":"+973","BD":"+880","BB":"+1246","BY":"+375","BE":"+32","BZ":"+501","BJ":"+229","BM":"+1441","BT":"+975","BO":"+591","BA":"+387","BW":"+267","BV":"+47","BR":"+55","IO":"+246","BN":"+673","BG":"+359","BF":"+226","BI":"+257","KH":"+855","CM":"+237","CA":"+1","CV":"+238","KY":"+345","CF":"+236","TD":"+235","CL":"+56","CN":"+86","CX":"+61","CC":"+61","CO":"+57","KM":"+269","CG":"+242","CD":"+243","CK":"+682","CR":"+506","CI":"+225","HR":"+385","CU":"+53","CY":"+357","CZ":"+420","DK":"+45","DJ":"+253","DM":"+1767","DO":"+1849","EC":"+593","EG":"+20","SV":"+503","GQ":"+240","ER":"+291","EE":"+372","ET":"+251","FK":"+500","FO":"+298","FJ":"+679","FI":"+358","FR":"+33","GF":"+594","PF":"+689","TF":"+262","GA":"+241","GM":"+220","GE":"+995","DE":"+49","GH":"+233","GI":"+350","GR":"+30","GL":"+299","GD":"+1473","GP":"+590","GU":"+1671","GT":"+502","GG":"+44","GN":"+224","GW":"+245","GY":"+592","HT":"+509","HM":"+0","VA":"+379","HN":"+504","HK":"+852","HU":"+36","IS":"+354","IN":"+91","ID":"+62","IR":"+98","IQ":"+964","IE":"+353","IM":"+44","IL":"+972","IT":"+39","JM":"+1876","JP":"+81","JE":"+44","JO":"+962","KZ":"+7","KE":"+254","KI":"+686","KP":"+850","KR":"+82","XK":"+383","KW":"+965","KG":"+996","LA":"+856","LV":"+371","LB":"+961","LS":"+266","LR":"+231","LY":"+218","LI":"+423","LT":"+370","LU":"+352","MO":"+853","MK":"+389","MG":"+261","MW":"+265","MY":"+60","MV":"+960","ML":"+223","MT":"+356","MH":"+692","MQ":"+596","MR":"+222","MU":"+230","YT":"+262","MX":"+52","FM":"+691","MD":"+373","MC":"+377","MN":"+976","ME":"+382","MS":"+1664","MA":"+212","MZ":"+258","MM":"+95","NA":"+264","NR":"+674","NP":"+977","NL":"+31","AN":"+599","NC":"+687","NZ":"+64","NI":"+505","NE":"+227","NG":"+234","NU":"+683","NF":"+672","MP":"+1670","NO":"+47","OM":"+968","PK":"+92","PW":"+680","PS":"+970","PA":"+507","PG":"+675","PY":"+595","PE":"+51","PH":"+63","PN":"+64","PL":"+48","PT":"+351","PR":"+1939","QA":"+974","RO":"+40","RU":"+7","RW":"+250","RE":"+262","BL":"+590","SH":"+290","KN":"+1869","LC":"+1758","MF":"+590","PM":"+508","VC":"+1784","WS":"+685","SM":"+378","ST":"+239","SA":"+966","SN":"+221","RS":"+381","SC":"+248","SL":"+232","SG":"+65","SK":"+421","SI":"+386","SB":"+677","SO":"+252","ZA":"+27","SS":"+211","GS":"+500","ES":"+34","LK":"+94","SD":"+249","SR":"+597","SJ":"+47","SZ":"+268","SE":"+46","CH":"+41","SY":"+963","TW":"+886","TJ":"+992","TZ":"+255","TH":"+66","TL":"+670","TG":"+228","TK":"+690","TO":"+676","TT":"+1868","TN":"+216","TR":"+90","TM":"+993","TC":"+1649","TV":"+688","UG":"+256","UA":"+380","AE":"+971","GB":"+44","US":"+1","UY":"+598","UZ":"+998","VU":"+678","VE":"+58","VN":"+84","VG":"+1284","VI":"+1340","WF":"+681","YE":"+967","ZM":"+260","ZW":"+263"};me.predefined=new String(me._getAttr('predefined',true));me.dformat=me.dformat.replace(/^\s+/,'').replace(/\s+$/,'').replace(/\s+/g,' ');me.predefined=me.predefined.replace(/^\s+/,'').replace(/\s+$/,'').replace(/\s+/g,' ');var str="",tmp=me.dformat.split(/\s+/),tmpv=me.predefined.split(/\s+/),attr=(typeof me.predefinedClick!='undefined'&&me.predefinedClick)?'placeholder':'value',nc=me.dformat.replace(/\s/g,'').length,c=0;for(var i=0;i';if(me.countryComponent){nc+=me.toDisplay=='iso'?3:4;str+='
';c++;} for(var i=0,h=tmp.length;i
'+$.trim(tmp[i])+'
';c++;}} str+='';return'
'+str+'
'+me.userhelp+'
';},after_show:function(){var me=this,tmp=me.dformat.split(' ');if(!('phone'in $.validator.methods)) $.validator.addMethod("phone",function(value,element){if(this.optional(element))return true;else return /^\+{0,1}\d*$/.test(value);});for(var i=0,h=tmp.length+(me.countryComponent?1:0);i'+this.userhelp+'
';}});$.fbuilder.controls['fhidden']=function(){};$.extend($.fbuilder.controls['fhidden'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"fhidden",title:"",predefined:"",show:function(){this.predefined=this._getAttr('predefined');return'
';}});$.fbuilder.controls['fSectionBreak']=function(){};$.extend($.fbuilder.controls['fSectionBreak'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Section Break",ftype:"fSectionBreak",userhelp:"A description of the section goes here.",show:function(){return'
'+this.userhelp+'
';}});$.fbuilder.controls['fPageBreak']=function(){};$.extend($.fbuilder.controls['fPageBreak'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Page Break",ftype:"fPageBreak",show:function(){return'
'+this.userhelp+'
';}});$.fbuilder.controls['fsummary']=function(){};$.extend($.fbuilder.controls['fsummary'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Summary",ftype:"fsummary",fields:"",exclude_empty:false,titleClassname:"summary-field-title",valueClassname:"summary-field-value",fieldsArray:[],show:function(){var me=this;if('string'!=typeof me.fields)return;var p=$.trim(me.fields.replace(/\,+/g,',')).split(','),l=p.length;if(l){var str='
'+((!/^\s*$/.test(me.title))?'

'+me.title+'

':'')+'
';return str;}},after_show:function(){var me=this;if('string'!=typeof me.fields)return;var p=$.trim(me.fields.replace(/\,+/g,',')).split(','),l=p.length,str='';if(l){for(var i=0;i';me.fieldsArray.push(p[i]);$(document).on('change','[id*="'+p[i]+'"]',function(){me.update();});}}} $(document).on('showHideDepEvent',function(evt,form_identifier){me.update();});$('#cp_calculatedfieldsf_pform'+me.form_identifier).bind('reset',function(){setTimeout(function(){me.update();},10);});} $('[id="'+me.name+'"]').html(str);},update:function(){for(var j=0,k=this.fieldsArray.length;j').html(v);tmp.find('script').remove();tt.find('.cff-summary-value').html(tmp.html().replace(/\s(on[a-z]*\s*=)/gi,"_$1"));if(e.hasClass('ignore')||(this.exclude_empty&&v=='')){tt.hide();}else{tt.show();}}} $('[id="'+this.name+'"]').trigger('cff-summary-update');}});$.fbuilder.controls['fcontainer']=function(){};$.fbuilder.controls['fcontainer'].prototype={fields:[],columns:1,rearrange:0,after_show:function(e){var e=e||$('#'+this.name),f;for(var i=0,h=this.fields.length;i1){f.addClass('column'+this.columns);if(i%this.columns==0&&!this.rearrange)f.css('clear','left');} f.appendTo(e);}},showHideDep:function(toShow,toHide,hiddenByContainer,interval){if(typeof hiddenByContainer=='undefined')hiddenByContainer={};var me=this,isHidden=(typeof toHide[me.name]!='undefined'||typeof hiddenByContainer[me.name]!='undefined'),fId,result=[];for(var i=0,h=me.fields.length;i
'+((!/^\s*$/.test(this.title)||this.collapsible)?''+this.title+'':'')+'
';},after_show:function(){var me=this;$.fbuilder.controls['fcontainer'].prototype.after_show.call(this);if(me.collapsible){function collapseApply(p){if(p.length){p.toggleClass('cff-collapsed');if(!p.hasClass('cff-collapsed')){p.siblings('.cff-selfclosing').addClass('cff-collapsed');}}} $('.'+me.name+'>fieldset>legend').bind('click',function(evt){collapseApply($(this).closest('.cff-collapsible'));evt.preventDefault();evt.stopPropagation();});$('.'+me.name).bind('click',function(){var e=$(this);if(e.hasClass('cff-collapsed'))collapseApply(e);});}},showHideDep:function(toShow,toHide,hiddenByContainer){return $.fbuilder.controls['fcontainer'].prototype.showHideDep.call(this,toShow,toHide,hiddenByContainer);}});$.fbuilder.controls['fdiv']=function(){};$.extend($.fbuilder.controls['fdiv'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"fdiv",fields:[],columns:1,rearrange:0,show:function(){return'
';},after_show:function(){$.fbuilder.controls['fcontainer'].prototype.after_show.call(this);},showHideDep:function(toShow,toHide,hiddenByContainer){return $.fbuilder.controls['fcontainer'].prototype.showHideDep.call(this,toShow,toHide,hiddenByContainer);}});$.fbuilder.controls['fMedia']=function(){};$.extend($.fbuilder.controls['fMedia'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"fMedia",sMediaType:"image",data:{image:{sWidth:"",sHeight:"",sSrc:"",sAlt:"",sLink:"",sTarget:"",sFigcaption:""},audio:{sWidth:"",sSrc:"",sSrcAlt:"",sControls:1,sLoop:0,sAutoplay:0,sMuted:0,sPreload:"auto",sFallback:"",sFigcaption:"",sHideDownload:0},video:{sWidth:"",sHeight:"",sSrc:"",sSrcAlt:"",sPoster:"",sControls:1,sLoop:0,sAutoplay:0,sMuted:0,sPreload:"auto",sFallback:"",sFigcaption:"",sHideDownload:0}},_show_image:function(){var d=this.data.image,esc=cff_esc_attr,a=[],l=[],r='';if($.trim(d.sWidth))a.push('width="'+esc(d.sWidth)+'"');if($.trim(d.sHeight))a.push('height="'+esc(d.sHeight)+'"');if($.trim(d.sSrc))a.push('src="'+esc(d.sSrc)+'"');if($.trim(d.sAlt))a.push('alt="'+esc(d.sAlt)+'"');if($.trim(d.sLink)){l.push('href="'+esc(d.sLink)+'"');if($.trim(d.sTarget))l.push('target="'+esc(d.sTarget)+'"');r='';}else{r='';} return r;},_show_audio_video:function(d,isV){var esc=cff_esc_attr,a=[],s=[],t=(isV)?'video':'audio';if($.trim(d.sWidth))s.push('width:'+esc(d.sWidth)+';');if(isV&&$.trim(d.sHeight))s.push('height:'+esc(d.sHeight)+';');if(isV&&$.trim(d.sPoster))a.push('poster="'+esc(d.sPoster)+'"');if($.trim(d.sSrc))a.push('src="'+esc(d.sSrc)+'"');if(d.sAutoplay)a.push('autoplay');if(d.sControls)a.push('controls');if(d.sLoop)a.push('loop');if(d.sMuted)a.push('muted');if(d.sHideDownload)a.push('controlsList="nodownload"');a.push('preload="'+esc(d.sPreload)+'"');return'<'+t+' '+a.join(' ')+' style="'+s.join(' ')+'">'+(($.trim(d.sSrcAlt))?'':'')+'

'+d.sFallback+'

';},_show_audio:function(){return this._show_audio_video(this.data.audio,false);},_show_video:function(){return this._show_audio_video(this.data.video,true);},show:function(){return'
'+this['_show_'+this.sMediaType]()+'
'+this.data[this.sMediaType].sFigcaption+'
';}});$.fbuilder.controls['frecordav']=function(){};$.extend($.fbuilder.controls['frecordav'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"frecordav",required:false,exclude:false,size:"medium",to_record:"video",max_time:0,beep:0,preview:false,video_width:320,video_height:240,record_label:'Record',stop_label:'Stop',status_message:'Recording saved',_has_hours_component:function(){return Math.floor(this.max_time/3600)?1:0;},_is_video:function(){return this.to_record=='video'||this.to_record=='audio-video';},_is_audio:function(){return this.to_record=='audio'||this.to_record=='audio-video';},_format_time_component:function(v){var _has_hours=this._has_hours_component(),hours=Math.floor(v/3600),minutes=Math.floor((v-hours*3600)/60),seconds=(v-hours*3600-minutes*60)%60,time_formatted=(_has_hours?(hours<10?'0'+hours:hours)+':':'')+(minutes<10?'0'+minutes:minutes)+':'+(seconds<10?'0'+seconds:seconds);return time_formatted;},_getUserMedia:function(){return navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||false;},show:function(){var max_time_formatted=this._format_time_component(this.max_time),time_formatted=(this._has_hours_component()?'00:':'')+'00:00';return'
'+''+'
'+''+'
'+'
'+cff_sanitize(this.record_label)+'
'+ (this.preview?'
':'')+ (this.max_time?'
'+time_formatted+'
'+max_time_formatted+'
':'')+'
'+'
'+'
'+cff_sanitize(this.status_message)+'
'+ (this.preview?(this._is_video()?'':''):'')+'
'+''+this.userhelp+'
';},after_show:function(){var me=this,mssg=$('#'+me.name+'_record_status'),record_btn=$('#'+this.name+'_record_btn'),play_btn=$('#'+me.name+'_play_btn'),file_ctrl=$('#'+me.name),media_ctrl=$('#'+me.name+'_media'),record_time=$('#'+me.name+'_record_time'),chunks=[],interval,streamRecorder,recording_flag=false;play_btn[_files().length?'removeClass':'addClass']('hide-strong');navigator.getUserMedia=me._getUserMedia();if(media_ctrl.length){media_ctrl[0].ontimeupdate=function(evt){if(!recording_flag)record_time.text(me._format_time_component(Math.round(evt.target.currentTime)));};media_ctrl[0].onended=function(evt){evt.target.currentTime=0;play_btn.removeClass('cff-record-stop-btn');};} if(!navigator.getUserMedia){$('.'+me.name).remove();return;} function _files(){return file_ctrl[0].files;};function _load_file(){var files=_files();if(files.length&&media_ctrl.length){media_ctrl[0].src=URL.createObjectURL(files[0]);return true;} return false;} function _random(){return Math.floor(Math.random()*(1000-9999+1)+1000);};function _stopRecording(){try{if(typeof streamRecorder!='undefined'){streamRecorder.onstop=function(evt){var container=new DataTransfer(),file=new File(chunks,me.to_record+_random()+'.webm',{type:'video/webm',lastModified:new Date().getTime()});container.items.add(file);file_ctrl[0].files=container.files;play_btn.removeClass('cff-record-stop-btn hide-strong');mssg.removeClass('hide-strong');_load_file();};streamRecorder.stop();}}catch(err){console.log(err);};record_btn.removeClass('cff-record-btn-recording');if(me._is_video()&&media_ctrl.length){media_ctrl[0].pause();media_ctrl[0].srcObject=null;} recording_flag=false;};record_btn.click(function(evt){var settings={video:(me._is_video())?{'facingMode':{exact:'user'}}:false,audio:(me._is_audio())?true:false};clearInterval(interval);play_btn.addClass('hide-strong');mssg.addClass('hide-strong');record_btn.toggleClass('cff-record-btn-recording');if(record_btn.hasClass('cff-record-btn-recording')){var i=0;chunks=[];recording_flag=true;if(me._is_video()&&media_ctrl.length)media_ctrl.removeClass('hide-strong');navigator.getUserMedia(settings,function(localMediaStream){streamRecorder=new MediaRecorder(localMediaStream);streamRecorder.ondataavailable=function(evt){chunks.push(evt.data);};streamRecorder.start();if(me._is_video()&&media_ctrl.length){media_ctrl[0].srcObject=localMediaStream;media_ctrl[0].play();} interval=setInterval(function(){i++;if(i'+err.name+'
');});}else{_stopRecording();}});play_btn.click(function(){if(_load_file()){play_btn.toggleClass('cff-record-stop-btn');if(play_btn.hasClass('cff-record-stop-btn'))media_ctrl[0].play();else media_ctrl[0].pause();}});}});$.fbuilder.controls['fButton']=function(){};$.extend($.fbuilder.controls['fButton'].prototype,$.fbuilder.controls['ffields'].prototype,{ftype:"fButton",sType:"button",sValue:"button",sLoading:false,sMultipage:false,sOnclick:"",sOnmousedown:"",userhelp:"A description of the section goes here.",show:function(){var esc=cff_esc_attr,type=this.sType,clss='';if(this.sType=='calculate'){type='button';clss='calculate-button';} if(this.sType=='print'){type='button';} else if(this.sType=='reset'){clss='reset-button';} return'
'+this.userhelp+'
';},after_show:function(){var me=this;$('#'+this.name).mousedown(function(){eval(me.sOnmousedown);});$('#'+this.name).click(function(){var e=$(this),f=e.closest('form'),fid=me.form_identifier;if(e.hasClass('calculate-button')){var items=$.fbuilder['forms'][fid].getItems();if(me.sLoading){f.find('.cff-processing-form').remove();$('
').appendTo(e.closest('#fbuilder'));} $(document).on('equationsQueueEmpty',function(evt,id){if(id==fid){if(me.sLoading)f.find('.cff-processing-form').remove();$(document).off('equationsQueueEmpty');for(var i=0,h=items.length;i
'+content+'
';}});$.fbuilder.controls['facceptance']=function(){};$.extend($.fbuilder.controls['facceptance'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Accept terms and conditions",ftype:"facceptance",value:"I accept",required:true,onoff:0,url:"",message:"",show:function(){var me=this,dlg='',label=me.title;if(!/^\s*$/.test(me.url)){label=''+label+'';} else if(!/^\s*$/.test(me.message)){label=''+label+'';dlg+='
'+me.message+'
'} return'
'+'
'+dlg+'
';},after_show:function(){$(document).on('click','.cff-open-dlg',function(){var dlg=$(this).closest('.fields').find('.cff-dialog'),w=dlg.data('width'),h=dlg.data('height');dlg.removeClass('hide');if('undefined'==typeof w)w=MIN($(this).closest('form').width(),$(window).width(),dlg.width());if('undefined'==typeof h)h=MIN($(this).closest('form').height(),$(window).height(),dlg.height());dlg.data('width',w);dlg.data('height',h);dlg.css({'width':w+'px','height':h+'px','margin-top':(-1*h/2)+'px','margin-left':(-1*w/2)+'px'});});$(document).on('click','.cff-close-dlg',function(){$(this).closest('.cff-dialog').addClass('hide');});},val:function(raw,no_quotes){raw=raw||false;no_quotes=no_quotes||false;var e=$('[id="'+this.name+'"]:checked:not(.ignore)');if(e.length){var t=$.fbuilder.parseValStr(e[0].value,raw,no_quotes);if(!$.isNumeric(t))t=t.replace(/^"/,'').replace(/"$/,'');} return(t)?(($.isNumeric(t)&&!no_quotes)?t:'"'+t+'"'):0;}});$.fbuilder.controls['fqrcode']=function(){};$.extend($.fbuilder.controls['fqrcode'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"",ftype:"fqrcode",predefined:"",required:false,readonly:false,size:"medium",show:function(){this.predefined=this._getAttr('predefined');return'
'+'
'+''+this.userhelp+'
';},after_show:function(){var me=this;$('#'+me.name).on('focus',function(){$('#fbuilder .cff-qrcode-container[id!="'+me.name+'_qrcontainer"]').html('');if(typeof Html5QrcodeScanner!='undefined'&&$('#fbuilder .cff-qrcode-container[id="'+me.name+'_qrcontainer"]').html()==''){(new Html5QrcodeScanner(me.name+'_qrcontainer',{fps:10},false)).render(function(decodedText,decodedResult){me.setVal(decodedText);},function(error){console.warn(`Code scan error=${error}`);});}});},val:function(raw,no_quotes){raw=true;no_quotes=no_quotes||false;var e=$('[id="'+this.name+'"]:not(.ignore)');if(e.length)return $.fbuilder.parseValStr(e.val(),raw,no_quotes);return'';}});$.fbuilder.controls['fCalculated']=function(){};$.extend($.fbuilder.controls['fCalculated'].prototype,$.fbuilder.controls['ffields'].prototype,{title:"Untitled",ftype:"fCalculated",predefined:"",required:false,size:"medium",min:"",max:"",eq:"",suffix:"",prefix:"",decimalsymbol:".",groupingsymbol:"",dependencies:[{'rule':'','complex':false,'fields':['']}],readonly:true,currency:false,noEvalIfManual:true,formatDynamically:false,dynamicEval:true,hidefield:false,_onEquationsQueueEmpty:function(evt){var me=evt.data.obj;if(!me.noEvalIfManual)$('[id="'+me.name+'"]').data('manually',0);},configuration:function(){var me=this;return{"suffix":me.suffix,"prefix":me.prefix,"groupingsymbol":me.groupingsymbol,"decimalsymbol":me.decimalsymbol,"currency":me.currency};},show:function(){this.predefined=this._getAttr('predefined');return'
'+((!this.hidefield)?''+this.userhelp+'':'')+'
';},after_show:function(){var me=this,dependencies=[];$.each(me.dependencies,function(i,d){d.rule=d.rule.replace(/^\s+/,'').replace(/\s+$/,'');if(d.rule!=''&&d.fields.length){var fields=[];$.each(d.fields,function(j,f){if(f!=''){fields.push(f);}});if(fields.length){dependencies.push({'rule':d.rule,'fields':fields});}}});me.dependencies=dependencies;var eq=me.eq;eq=eq.replace(/\n/g,' ').replace(/fieldname(\d+)/g,"fieldname$1"+me.form_identifier).replace(/form_identifier/g,'\''+this['form_identifier']+'\'').replace(/;\s*\)/g,')').replace(/;\s*$/,'');if(!/^\s*$/.test(eq)){$.fbuilder.calculator.addEquation(me,eq,dependencies,me.form_identifier);} var e=$('[id="'+me.name+'"]');e.bind('calcualtedfield_changed',{obj:me},function(evt){if($.fbuilder['calculator'].getDepList(evt.data.obj.name,{value:evt.data.obj.val(),raw:evt.data.obj.val(true)},evt.data.obj.dependencies)){$.fbuilder.showHideDep({'formIdentifier':evt.data.obj.form_identifier,'fieldIdentifier':evt.data.obj.name});}}).on('keyup',function(){if(!me.readonly){e.data('manually',1);e.data('bk',e.val());$(document).off('equationsQueueEmpty',me._onEquationsQueueEmpty);$(document).one('equationsQueueEmpty',{obj:me},me._onEquationsQueueEmpty);e.trigger('calcualtedfield_changed');}}).on('change',function(){if(e.data('manually')&&e.data('manually')==1&&me.formatDynamically){var v=(me.val(true,true)+'').replace(new RegExp('[^\\-\\d'+me.decimalsymbol.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,'\\$&')+']','g'),'').replace(/[^\d\-]/g,'.');this.value=$.fbuilder.calculator.format(v,me.configuration());try {$(this).valid();}catch(err){}}else if($(this).hasClass('cpefb_error')){try {$(this).valid();}catch(err){}}});$('#cp_calculatedfieldsf_pform'+me.form_identifier).bind('reset',function(){e.removeData('manually');});},showHideDep:function(toShow,toHide,hiddenByContainer,interval){if(typeof hiddenByContainer=='undefined')hiddenByContainer={};var me=this,result=[];if($.fbuilder['calculator'].getDepList(me.name,{value:me.val(),raw:me.val(true)},me.dependencies)){var item=$('#'+me.name),identifier=me.form_identifier,isHidden=(typeof toHide[me.name]!='undefined'||typeof hiddenByContainer[me.name]!='undefined'),d,n,dep,clearRef=function(id){if(typeof toShow[id]!='undefined'){delete toShow[id]['ref'][me.name];if($.isEmptyObject(toShow[id]['ref'])) delete toShow[id];}},hideField=function(id){$('[id*="'+id+'"],.'+id).closest('.fields').hide();$('[id*="'+id+'"]:not(.ignore)').addClass('ignore');toHide[id]={};};try {d=item.attr('dep');if(typeof d!='undefined'&&!/^\s*$/.test(d))d=d.split(',');else d=[];n=item.attr('notdep');if(typeof n!='undefined'&&!/^\s*$/.test(n))n=n.split(',');else n=[];if(isHidden){n=n.concat(d);d=[];} for(i=0;i=0;i--){counter++;str=parts[0][i]+str;if(counter%3==0&&i!=0)str=config.groupingsymbol+str;} parts[0]=str;} if(!('decimalsymbol'in config))config.decimalsymbol='.';value=parts.join(config.decimalsymbol);} if(config.currency&&!isNumeric){delete config.prefix;delete config.suffix;} if(config.prefix){if(!config.currency){value=symbol+value;symbol='';} value=config.prefix+value;} if(config.suffix)value+=config.suffix;value=symbol+value;} return value;},unformat:function(field){var escapeSymbol=$.fbuilder.escapeSymbol;var eq=field[0].form.equations,v=field.val();for(var i=0,h=eq.length;i=33&&evt.keyCode<=40))return;_checkValueThrowingEquation(t);}else{if(((t.prop('tagName')=='INPUT'&&/(text|number|email|password)/.test(t.attr('type').toLowerCase())||t.prop('tagName')=='TEXTAREA')&&evt.type!='change')){return;} obj.Calculate(t[0]);}});$(document).on('showHideDepEvent',function(evt,form_identifier){var f,evalequations,first_time;if(form_identifier)f=$('#'+form_identifier);else f=$('[id*="cp_calculatedfieldsf_pform_"]:eq(0)');if(f.length){first_time=(typeof f.data('first_time')=='undefined');f.data('first_time',0);evalequations=f.attr('data-evalequations');if(typeof evalequations=='undefined'||evalequations*1==1){if(first_time)obj.defaultCalc('#'+f.attr('id'));else obj.defaultCalc('#'+f.attr('id'),true);}}});return obj;})();try{!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);}catch(err){}if(typeof $.fn['fbuilder_serializeObject']=='undefined'){$.fn.fbuilder_serializeObject=function(){var o={},a=this.serializeArray();$.each(a,function(){if(/^fieldname\d+_\d+(\[\])?$/.test(this.name))this.name=this.name.match(/fieldname\d+/)[0];else return;if(o[this.name]){if(!o[this.name].push){o[this.name]=[o[this.name]];} o[this.name].push(this.value||'');}else{o[this.name]=this.value||'';}});return o;};} $.fn.fbuilder_localstorage=function(){var form=this,id=form.attr('id'),sq=(typeof id=='undefined')?1:id.replace(/[^\d]/g,''),localStore_obj,fields;if(sq=='')sq=1;localStore_obj=new $.fbuilder_localstorage(form,true);$(document).on('change','#'+id+' *',function(evt){if(typeof this['id']!='undefined'&&/^fieldname\d+_\d+$/i.test(this.id)&&typeof this['value']!='undefined'){localStore_obj.set_fields();}});form.on('submit',function(){localStore_obj.clear_fields();});fields=localStore_obj.get_fields();if(!$.isEmptyObject(fields)){if(typeof cpcff_default=='undefined')cpcff_default={};if(typeof cpcff_default[sq]=='undefined')cpcff_default[sq]={};cpcff_default[sq]=$.extend(cpcff_default[sq],fields);} return this;} $.fbuilder_localstorage=function(form,debug){this.form=form;this.id=form.attr('id')+'_'+form.find('[name="cp_calculatedfieldsf_id"]').val();this.debug=(typeof debug!='undefined'&&debug)?true:false;};$.fbuilder_localstorage.prototype=(function(){var is_available;function _log(mssg){if(typeof console!='undefined')console.log(mssg);};return{is_available:function(){if(typeof is_available!='undefined')return is_available;try{var storage=window['localStorage'],x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);is_available=true;return true;} catch(e){if(this.debug)_log('localStorage object is not available');is_available=false;return e instanceof DOMException&&(e.code===22||e.code===1014||e.name==='QuotaExceededError'||e.name==='NS_ERROR_DOM_QUOTA_REACHED')&&storage.length!==0;}},get_fields:function(){try{if(typeof this.fields=='undefined')this.fields=JSON.parse(localStorage.getItem(this.id));return this.fields;}catch(err){_log('Error reading the fields.');_log(err);}},set_fields:function(){try{this.fields=this.form.fbuilder_serializeObject();localStorage.setItem(this.id,JSON.stringify(this.fields));}catch(err){_log('Error saving the fields.');_log(err);}},clear_fields:function(){try{localStorage.removeItem(this.id);}catch(err){_log('Error deleting the fields.');_log(err);}}};})();$.fbuilder.generate_form=function(fnum){try{var cp_calculatedfieldsf_fbuilder_config=window["cp_calculatedfieldsf_fbuilder_config"+fnum];if(cp_calculatedfieldsf_fbuilder_config&&$("#fbuilder"+fnum).length&&$("#fbuilder"+fnum).attr('data-processed')==undefined){if($("#fbuilder"+fnum).is(':visible')){var f=$("#fbuilder"+fnum).fbuilder((typeof cp_calculatedfieldsf_fbuilder_config.obj=='string')?$.parseJSON(cp_calculatedfieldsf_fbuilder_config.obj):cp_calculatedfieldsf_fbuilder_config.obj);f.attr('data-processed',1);f.fBuild.loadData("form_structure"+fnum);}else{$.fbuilder.form_become_visible("#fbuilder"+fnum,(function(n){return function(){$.fbuilder.generate_form(n);};})(fnum));}}}catch(e){if(typeof console!='undefined')console.log(e);}};$.fbuilder.form_become_visible=function(element,callback){if(!('hidden_forms'in $.fbuilder))$.fbuilder.hidden_forms=[];$.fbuilder.hidden_forms.push({'element':element,'callback':callback});if('form_become_visible_interval'in $.fbuilder)clearInterval($.fbuilder['form_become_visible_interval']);$.fbuilder['form_become_visible_interval']=setInterval(function(){for(var i=$.fbuilder.hidden_forms.length-1;0<=i;i--){if($($.fbuilder.hidden_forms[i]['element']).is(':visible')){$.fbuilder.hidden_forms[i]['callback'].call();$.fbuilder.hidden_forms.splice(i,1);}} if($.fbuilder.hidden_forms.length==0)clearInterval($.fbuilder['form_become_visible_interval']);},500);};} var fcount=1;var fnum="_"+fcount;while(typeof window["cp_calculatedfieldsf_fbuilder_config"+fnum]!='undefined'||fcount<10){$.fbuilder.generate_form(fnum);fcount++;fnum="_"+fcount;}})(fbuilderjQuery);};fbuilderjQuery(fbuilderjQuery.fbuilderjQueryGenerator);fbuilderjQuery(window).on('load',fbuilderjQuery.fbuilderjQueryGenerator);fbuilderjQuery(document).on('elementor/popup/show',function(event,id,instance){var popup=fbuilderjQuery('[data-elementor-type="popup"]');if(popup.length){var psequence=fbuilderjQuery('[name="cp_calculatedfieldsf_pform_psequence"]'),fnum,flist;if(psequence.length){fnum=psequence.val();if(popup.find('#fieldlist'+fnum+':empty').length){popup.find("#fbuilder"+fnum).removeAttr('data-processed');fbuilderjQuery.fbuilderjQueryGenerator();}}}}); !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('
    ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h(''),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):ithis.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
      '),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('
    • ×
    • ')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('
    • '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ai.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1=$tabs.tabs("length")&&(index=0),$tabs.tabs("select",index)):(index=$tabs.tabs("option","active"),length=$tabs.find(".wpb_tab").length,index=jQuery(this).parent().hasClass("wpb_next_slide")?length<=index+1?0:index+1:index-1<0?length-1:index-1,$tabs.tabs("option","active",index))})})}}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(index){var $tabs,active_tab,collapsible,$this=jQuery(this);$this.attr("data-interval"),collapsible=!1===(active_tab=!isNaN(jQuery(this).data("active-tab"))&&0 div > h3",autoHeight:!1,heightStyle:"content",active:active_tab,collapsible:collapsible,navigation:!0,activate:vc_accordionActivate,change:function(event,ui){void 0!==jQuery.fn.isotope&&ui.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(ui.newPanel)}}),!0===$this.data("vcDisableKeydown")&&($tabs.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var layout_modes={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var $container=jQuery(this),$thumbs=$container.find(".wpb_thumbnails"),layout_mode=$thumbs.attr("data-layout-mode");$thumbs.isotope({itemSelector:".isotope-item",layoutMode:void 0===layout_modes[layout_mode]?"fitRows":layout_modes[layout_mode]}),$container.find(".categories_filter a").data("isotope",$thumbs).on("click",function(e){e&&e.preventDefault&&e.preventDefault();var $thumbs=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),$thumbs.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).bind("load resize",function(){$thumbs.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function($parent){($parent?$parent.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var $this=jQuery(this);if(!0!==$this.data("carousel_enabled")&&$this.is(":visible")){$this.data("carousel_enabled",!0);getColumnsCount(jQuery(this));jQuery(this).hasClass("columns_count_1")&&900;var carousel_li=jQuery(this).find(".wpb_thumbnails-fluid li");carousel_li.css({"margin-right":carousel_li.css("margin-left"),"margin-left":0});var fluid_ul=jQuery(this).find("ul.wpb_thumbnails-fluid");fluid_ul.width(fluid_ul.width()+300),jQuery(window).on("resize",function(){screen_size!=(screen_size=getSizeName())&&window.setTimeout(function(){location.reload()},20)})}})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(index){var $imagesGrid,this_element=jQuery(this);if(this_element.hasClass("wpb_slider_nivo")){var sliderTimeout=1e3*this_element.attr("data-interval");0===sliderTimeout&&(sliderTimeout=9999999999),this_element.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:sliderTimeout,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"})}else this_element.hasClass("wpb_image_grid")&&(jQuery.fn.imagesLoaded?$imagesGrid=this_element.find(".wpb_image_grid_ul").imagesLoaded(function(){$imagesGrid.isotope({itemSelector:".isotope-item",layoutMode:"fitRows"})}):this_element.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows"}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1')}),vc_initVideoBackgrounds(),callSkrollInit=!1,window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),$(".vc_parallax-inner").remove(),$("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),$("[data-vc-parallax]").each(function(){var skrollrSize,skrollrStart,$parallaxElement,parallaxImage,youtubeId;callSkrollInit=!0,"on"===$(this).data("vcParallaxOFade")&&$(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),skrollrSize=100*$(this).data("vcParallax"),($parallaxElement=$("
      ").addClass("vc_parallax-inner").appendTo($(this))).height(skrollrSize+"%"),parallaxImage=$(this).data("vcParallaxImage"),(youtubeId=vcExtractYoutubeId(parallaxImage))?insertYoutubeVideoAsBackground($parallaxElement,youtubeId):void 0!==parallaxImage&&$parallaxElement.css("background-image","url("+parallaxImage+")"),skrollrStart=-(skrollrSize-100),$parallaxElement.attr("data-bottom-top","top: "+skrollrStart+"%;").attr("data-top-bottom","top: 0%;")}),callSkrollInit&&window.skrollr&&(vcSkrollrOptions={forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}},window.vcParallaxSkroll=skrollr.init(vcSkrollrOptions),window.vcParallaxSkroll)}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(el){for(var find=!1,i=1;!1===find;){if(el.hasClass("columns_count_"+i))return find=!0,i;i++}});var screen_size=getSizeName();function getSizeName(){var screen_w=jQuery(window).width();return 1170
      ').find(".inner");new YT.Player($container[0],{width:"100%",height:"100%",videoId:youtubeId,playerVars:{playlist:youtubeId,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,wmode:"transparent"},events:{onReady:function(event){event.target.mute().setLoop(!0)}}}),vcResizeVideoBackground($element),jQuery(window).bind("resize",function(){vcResizeVideoBackground($element)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function($element){var iframeW,iframeH,marginLeft,marginTop,containerW=$element.innerWidth(),containerH=$element.innerHeight();containerW/containerH<16/9?(iframeW=containerH*(16/9),iframeH=containerH,marginLeft=-Math.round((iframeW-containerW)/2)+"px",marginTop=-Math.round((iframeH-containerH)/2)+"px"):(iframeH=(iframeW=containerW)*(9/16),marginTop=-Math.round((iframeH-containerH)/2)+"px",marginLeft=-Math.round((iframeW-containerW)/2)+"px"),iframeW+="px",iframeH+="px",$element.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:marginLeft,marginTop:marginTop,width:iframeW,height:iframeH})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(url){if(void 0===url)return!1;var id=url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);return null!==id&&id[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var $=window.jQuery,$wpbGmapsWidget=$(".wpb_gmaps_widget");$wpbGmapsWidget.on("click",function(){$("iframe",this).css("pointer-events","auto")}),$wpbGmapsWidget.on("mouseleave",function(){$("iframe",this).css("pointer-events","none")}),$(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),perspective=4*$this.width()+"px";$this.css("perspective",perspective)})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(hoverBox){hoverBox.each(function(){var $this=jQuery(this),hoverBoxInner=$this.find(".vc-hoverbox-inner");hoverBoxInner.css("min-height",0);var frontHeight=$this.find(".vc-hoverbox-front-inner").outerHeight(),backHeight=$this.find(".vc-hoverbox-back-inner").outerHeight(),hoverBoxHeight=backHeight').append(e),l=r.find("link"),i=0,s=!1;0===l.length?a(e):(setTimeout(function(){i<=l.length&&!s&&(a(m(r.html())),s=!0)},500),l.each(function(){void 0!==m(this).attr("id")&&-1!==m(this).attr("id").indexOf("theme_settings_")&&m("head").find('link[id*="theme_settings_"]:not([id*="theme_settings_default"])').remove()}),l.each(function(){var e,o,t=m(this),n=t.attr("id"),d=t.attr("href");void 0!==n&&(e=-1!==n.indexOf("theme_settings_"),o=-1!==n.indexOf("theme_settings_default"),t.remove(),void 0!==woodmart_page_css[n]||o?++i>=l.length&&!s&&(a(m(r.html())),s=!0):m("head").append(t.on("load",function(){i++,e||(woodmart_page_css[n]=d),i>=l.length&&!s&&(a(m(r.html())),s=!0)})))}))},woodmartThemeModule.debounce=function(n,d,a){var r;return function(){var e=this,o=arguments,t=a&&!r;clearTimeout(r),r=setTimeout(function(){r=null,a||n.apply(e,o)},d),t&&n.apply(e,o)}},woodmartThemeModule.wdElementorAddAction=function(e,o){woodmartThemeModule.$window.on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&elementorFrontend.hooks.addAction(e,o)})},woodmartThemeModule.wdElementorAddAction("frontend/element_ready/global",function(e){e.attr("style")&&0===e.attr("style").indexOf("transform:translate3d")&&!e.hasClass("wd-parallax-on-scroll")&&e.attr("style",""),e.removeClass("wd-animated"),e.data("wd-waypoint",""),e.removeClass("wd-anim-ready"),woodmartThemeModule.$document.trigger("wdElementorGlobalReady")}),m.each(["frontend/element_ready/column","frontend/element_ready/container"],function(e,o){woodmartThemeModule.wdElementorAddAction(o,function(e){e.attr("style")&&0===e.attr("style").indexOf("transform:translate3d")&&!e.hasClass("wd-parallax-on-scroll")&&e.attr("style",""),e.removeClass("wd-animated"),e.data("wd-waypoint",""),e.removeClass("wd-anim-ready"),setTimeout(function(){woodmartThemeModule.$document.trigger("wdElementorColumnReady")},100)})}),woodmartThemeModule.setupMainCarouselArg=function(){woodmartThemeModule.$mainCarouselWrapper=m(".woocommerce-product-gallery");var e=1;(woodmartThemeModule.$mainCarouselWrapper.hasClass("thumbs-position-centered")||woodmartThemeModule.$mainCarouselWrapper.hasClass("thumbs-position-carousel_two_columns"))&&(e=2),woodmartThemeModule.mainCarouselArg={rtl:woodmartThemeModule.$body.hasClass("rtl"),items:e,autoplay:woodmart_settings.product_slider_autoplay,autoplayTimeout:3e3,loop:woodmart_settings.product_slider_autoplay,center:woodmartThemeModule.$mainCarouselWrapper.hasClass("thumbs-position-centered"),startPosition:woodmartThemeModule.$mainCarouselWrapper.hasClass("thumbs-position-centered")?woodmart_settings.centered_gallery_start:0,dots:"yes"===woodmart_settings.product_slider_dots||woodmartThemeModule.$mainCarouselWrapper.find(".woocommerce-product-gallery__wrapper").data("hide_pagination_control")&&"yes"!==woodmartThemeModule.$mainCarouselWrapper.find(".woocommerce-product-gallery__wrapper").data("hide_pagination_control"),nav:!0,autoHeight:"yes"===woodmart_settings.product_slider_auto_height,navText:!1,navClass:["owl-prev wd-btn-arrow","owl-next wd-btn-arrow"]}},woodmartThemeModule.shopLoadMoreBtn=".wd-products-load-more.load-on-scroll",woodmartThemeModule.$window.on("elementor/frontend/init",function(){elementorFrontend.isEditMode()&&"enabled"===woodmart_settings.elementor_no_gap&&(m.each(["frontend/element_ready/section","frontend/element_ready/container"],function(e,o){woodmartThemeModule.wdElementorAddAction(o,function(e){e.attr("style")&&0===e.attr("style").indexOf("transform:translate3d")&&!e.hasClass("wd-parallax-on-scroll")&&e.attr("style",""),e.removeClass("wd-animated"),e.data("wd-waypoint",""),e.removeClass("wd-anim-ready"),woodmartThemeModule.$document.trigger("wdElementorSectionReady")}),elementorFrontend.hooks.addAction(o,function(e){var o,t=e.data("model-cid");void 0!==elementorFrontend.config.elements.data[t]&&(o="",void 0!==elementorFrontend.config.elements.data[t].attributes.elType&&("container"===elementorFrontend.config.elements.data[t].attributes.elType?o=elementorFrontend.config.elements.data[t].attributes.boxed_width.size:"section"===elementorFrontend.config.elements.data[t].attributes.elType&&(o=elementorFrontend.config.elements.data[t].attributes.content_width.size)),o||e.addClass("wd-negative-gap"))})}),elementor.channels.editor.on("change:section change:container",function(e){var o,t=e.elementSettingsModel.changed;void 0===t.content_width&&void 0===t.boxed_width||(o=[],void 0!==t.content_width?o=t.content_width.size:void 0!==t.boxed_width&&(o=t.boxed_width.size),t=e._parent.model.id,e=m(".elementor-element-"+t),o?e.removeClass("wd-negative-gap"):e.addClass("wd-negative-gap"))}))}),woodmartThemeModule.$window.on("load",function(){m(".wd-preloader").delay(parseInt(woodmart_settings.preloader_delay)).addClass("preloader-hide"),m(".wd-preloader-style").remove(),setTimeout(function(){m(".wd-preloader").remove()},200)}),woodmartThemeModule.googleMapsCallback=function(){return""}}(jQuery),window.onload=function(){function o(e){jQuery(window).trigger("wdEventStarted"),t()}var e=["keydown","scroll","mouseover","touchmove","touchstart","mousedown","mousemove"],t=function(){e.forEach(function(e){window.removeEventListener(e,o)})};e.forEach(function(e){window.addEventListener(e,o)})}; !function(e){woodmartThemeModule.woocommerceNotices=function(){woodmartThemeModule.$body.on("click",".woocommerce-error, .woocommerce-info, .woocommerce-message, div.wpcf7-response-output, #yith-wcwl-popup-message, .mc4wp-alert, .dokan-store-contact .alert-success, .yith_ywraq_add_item_product_message",function(){o(e(this))});var o=function(o){o.removeClass("shown-notice").addClass("hidden-notice")}},e(document).ready(function(){woodmartThemeModule.woocommerceNotices()})}(jQuery); !function(o){woodmartThemeModule.siteScroll=function(){window.innerWidth>woodmartThemeModule.windowWidth&&o("html").addClass("wd-scrollbar")},o(document).ready(function(){woodmartThemeModule.siteScroll()})}(jQuery); !function(t){woodmartThemeModule.menuStickyOffsets=function(){var d=t(".wd-sticky-nav"),n=t(".wd-close-side");function o(e,o=!0){e.addClass("wd-opened"),d.addClass("wd-opened"),n.addClass("wd-close-side-opened").addClass("wd-location-sticky-nav"),o&&d.on("mouseout",function(){s(),d.off("mouseout")})}function s(){t(".wd-header-sticky-nav").removeClass("wd-opened"),d.removeClass("wd-opened"),n.removeClass("wd-close-side-opened").removeClass("wd-location-sticky-nav")}t(".wd-sticky-nav .wd-nav-sticky.wd-nav-vertical").each(function(){var e=t(this),o=(e.on("mouseenter mousemove",function(){e.hasClass("wd-offsets-calculated")||(e.find("> .menu-item-has-children").each(function(){o(t(this))}),e.addClass("wd-offsets-calculated"))}),void 0!==woodmart_settings.clear_menu_offsets_on_resize&&"yes"!==woodmart_settings.clear_menu_offsets_on_resize||setTimeout(function(){woodmartThemeModule.$window.on("resize",woodmartThemeModule.debounce(function(){e.removeClass("wd-offsets-calculated"),e.find(" > .menu-item-has-children > .wd-dropdown-menu").attr("style","")},300))},2e3),function(e){var e=e.find(" > .wd-dropdown-menu"),o=e.innerHeight(),d=e.offset().top-woodmartThemeModule.$window.scrollTop(),n=woodmartThemeModule.$window.height();e.attr("style",""),o&&d&&n<=d+o&&e.css({top:-(d+o-n)})})}),woodmartThemeModule.$document.on("click",".wd-header-sticky-nav",function(e){e.preventDefault();e=t(this);o(e,e.hasClass("wd-close-menu-mouseout"))}),woodmartThemeModule.$document.on("mouseenter mousemove",".wd-header-sticky-nav.wd-event-hover",function(){o(t(this))}),woodmartThemeModule.$document.on("click",".wd-close-side.wd-location-sticky-nav",function(){s()})},t(document).ready(function(){woodmartThemeModule.menuStickyOffsets()})}(jQuery); !function(n){woodmartThemeModule.menuOverlay=function(){var l,e=".wd-header-nav.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-hover, .wd-header-cats.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-hover, .wd-sticky-nav:not(.wd-opened), .wd-header-cats.wd-with-overlay.wd-event-hover, .wd-header-my-account.wd-with-overlay, .wd-header-cart.wd-with-overlay, .wd-header-search.wd-display-dropdown.wd-with-overlay";woodmartThemeModule.$document.on("mouseleave",e,function(){n(this).parents(".wd-header-cats.wd-with-overlay.wd-event-click.wd-opened").length||n(".wd-close-side").attr("class",l)}),woodmartThemeModule.$document.on("mouseenter mousemove",e,function(){var e,d,a,t,o=n(this),s=n(".wd-close-side");s.hasClass("wd-close-side-opened")||n("html").hasClass("platform-iOS")||(e=o.parents(".whb-header").length,d=o.parents(".whb-clone").length,a=o.hasClass("wd-sticky-nav"),t=o.parents(".wd-header-cats").length,l=s.attr("class"),e?(o.parents(".whb-sticked").length?s.addClass("wd-location-header-sticky"):s.addClass("wd-location-header"),t&&s.addClass("wd-location-header-cats")):d?s.addClass("wd-location-header-sticky"):a&&s.addClass("wd-location-sticky-nav"),s.addClass("wd-close-side-opened"))}),woodmartThemeModule.$document.on("click",".wd-header-nav.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-click, .wd-header-cats.wd-with-overlay .item-level-0.menu-item-has-children.wd-event-click, .wd-header-cats.wd-with-overlay.wd-event-click",function(){var e=n(".wd-close-side"),d=n(this);d.hasClass("wd-opened")&&e.hasClass("wd-close-side-opened")||d.parents(".wd-header-cats.wd-with-overlay.wd-event-click.wd-opened").length||d.parents(".wd-header-cats.wd-with-overlay.wd-event-hover").length||e.toggleClass("wd-close-side-opened").toggleClass("wd-location-header")}),woodmartThemeModule.$document.on("click touchstart",".wd-close-side.wd-location-header",function(){n(this).removeClass("wd-location-header")})},n(document).ready(function(){woodmartThemeModule.menuOverlay()})}(jQuery); !function(m){woodmartThemeModule.menuOffsets=function(){m(".wd-header-main-nav ul.menu > li, .wd-header-secondary-nav ul.menu > li, .widget_nav_mega_menu ul.menu:not(.wd-nav-vertical) > li, .wd-header-main-nav .wd-dropdown.wd-design-aside ul > li").each(function(){var e=m(this);function d(){e.hasClass("wd-offsets-calculated")||e.parents(".wd-design-aside").length||(e.find(" > .menu-item-has-children").each(function(){var e,d,s,o,n,a,t,i,w,l;e=m(this),i=e.find(" > .wd-dropdown-menu"),w=i.outerWidth(),l=i.offset(),i.attr("style",""),w&&l&&(i.hasClass("wd-design-full-width")||i.hasClass("wd-design-aside")?(s=woodmartThemeModule.$window.width(),woodmartThemeModule.$body.hasClass("rtl")?s<=(o=s-l.left-w)+w&&i.css({right:-(d=o+w-s)}):l.left+w>=s&&(d=l.left+w-s,i.css({left:-d}))):(i.hasClass("wd-design-sized")||i.hasClass("wd-design-full-height"))&&(s=woodmart_settings.site_width,o=(s=woodmartThemeModule.$window.width() .menu-item-has-children > .wd-dropdown-menu").attr("style","")},300))},2e3)})},woodmartThemeModule.menuDropdownAside=function(){m(".wd-nav .wd-design-aside, .wd-header-cats.wd-open-dropdown .wd-nav").each(function(){var e,d=m(this).find(".menu-item");d.length&&((e=d.first()).hasClass("menu-item-has-children")||e.parents(".wd-sub-menu-wrapp").addClass("wd-empty-item"),e.addClass("wd-opened").find(".wd-dropdown").addClass("wd-opened"),d.on("mouseover",function(){var e=m(this),d=e.parents(".wd-sub-menu-wrapp");e.hasClass("wd-opened")||(e.hasClass("item-level-1")&&(e.hasClass("menu-item-has-children")?d.removeClass("wd-empty-item"):d.addClass("wd-empty-item")),e.siblings().removeClass("wd-opened").find(".wd-dropdown").removeClass("wd-opened"),e.addClass("wd-opened").find(".wd-dropdown").addClass("wd-opened"))}))})},woodmartThemeModule.$window.on("wdEventStarted",function(){setTimeout(function(){woodmartThemeModule.menuDropdownAside(),woodmartThemeModule.menuOffsets()},100)})}(jQuery); !function(d){woodmartThemeModule.menuSetUp=function(){var n=d(".wd-nav, .wd-header-cats"),o="wd-opened";function e(){woodmartThemeModule.$window.width()<=1024?n.find(" > .menu-item-has-children.wd-event-hover").each(function(){d(this).data("original-event","hover").removeClass("wd-event-hover").addClass("wd-event-click")}):n.find(" > .wd-event-click").each(function(){var e=d(this);"hover"===e.data("original-event")&&e.removeClass("wd-event-click").addClass("wd-event-hover")})}d(".mobile-nav").find("ul.wd-nav-mobile").find(" > li").has(".wd-dropdown-menu").addClass("menu-item-has-children"),woodmartThemeModule.$document.on("click",".wd-nav .wd-event-click > a, .wd-header-cats.wd-event-click > span",function(e){e.preventDefault();e=d(this);e.parent().siblings().hasClass(o)&&e.parent().siblings().removeClass(o),e.parent().toggleClass(o)}),woodmartThemeModule.$document.on("click",function(e){e=e.target;!(0]+)?%>/g,function(e){e=e.slice(2,-2);return r.find(e).length?f("
      ").append(r.find(e).first().clone()).html():void 0!==s[e]?s[e]:""})).replace(/]*>/g,""),r.after(d),(r=r.parent().find(".whb-clone")).find(".whb-row").removeClass("whb-flex-equal-sides").addClass("whb-flex-flex-middle")),o.on("scroll",function(){var e=n,s=woodmartThemeModule.$window.scrollTop(),l=woodmartThemeModule.$window.height(),o=woodmartThemeModule.$document.height(),d=(0$1").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/<(\/?strong)>/g,"<$1>")},u.prototype={killerFn:null,initialize:function(){var e,t=this,n="."+t.classes.suggestion,o=t.classes.selected,s=t.options;t.element.setAttribute("autocomplete","off"),t.killerFn=function(e){0===d(e.target).closest("."+t.options.containerClass).length&&(t.killSuggestions(),t.disableKillerFn())},t.noSuggestionsContainer=d('
      ').html(this.options.noSuggestionNotice).get(0),t.suggestionsContainer=u.utils.createNode(s.containerClass),(e=d(t.suggestionsContainer)).appendTo(s.appendTo),"auto"!==s.width&&e.width(s.width),e.on("mouseover.autocomplete",n,function(){t.activate(d(this).data("index"))}),e.on("mouseout.autocomplete",function(){t.selectedIndex=-1,e.children("."+o).removeClass(o)}),e.on("click.autocomplete",n,function(){t.select(d(this).data("index"))}),t.fixPositionCapture=function(){t.visible&&t.fixPosition()},d(window).on("resize.autocomplete",t.fixPositionCapture),t.el.on("keydown.autocomplete",function(e){t.onKeyPress(e)}),t.el.on("keyup.autocomplete",function(e){t.onKeyUp(e)}),t.el.on("blur.autocomplete",function(){t.onBlur()}),t.el.on("focus.autocomplete",function(){t.onFocus()}),t.el.on("change.autocomplete",function(e){t.onKeyUp(e)}),t.el.on("input.autocomplete",function(e){t.onKeyUp(e)})},onFocus:function(){var e=this;e.fixPosition(),0===e.options.minChars&&0===e.el.val().length&&e.onValueChange()},onBlur:function(){this.enableKillerFn()},abortAjax:function(){var e=this;e.currentRequest&&(e.currentRequest.abort(),e.currentRequest=null)},setOptions:function(e){var t=this,n=t.options;d.extend(n,e),t.isLocal=Array.isArray(n.lookup),t.isLocal&&(n.lookup=t.verifySuggestionsFormat(n.lookup)),n.orientation=t.validateOrientation(n.orientation,"bottom"),d(t.suggestionsContainer).css({"max-height":n.maxHeight+"px",width:n.width+"px","z-index":n.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){var e=this;e.disabled=!0,clearInterval(e.onChangeInterval),e.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var e,t,n,o,s,i,a,l,r=this,u=d(r.suggestionsContainer),c=u.parent().get(0);c!==document.body&&!r.options.forceFixPosition||(i=r.options.orientation,e=u.outerHeight(),t=r.el.outerHeight(),n={top:(l=r.el.offset()).top,left:l.left},"auto"===i&&(a=d(window).height(),o=-(s=d(window).scrollTop())+l.top-e,s=s+a-(l.top+t+e),i=Math.max(o,s)===o?"top":"bottom"),n.top+="top"===i?-e:t,c!==document.body&&(a=u.css("opacity"),r.visible||u.css("opacity",0).show(),l=u.offsetParent().offset(),n.top-=l.top,n.left-=l.left,r.visible||u.css("opacity",a).hide()),"auto"===r.options.width&&(n.width=r.el.outerWidth()-2+"px"),u.css(n))},enableKillerFn:function(){d(document).on("click.autocomplete",this.killerFn)},disableKillerFn:function(){d(document).off("click.autocomplete",this.killerFn)},killSuggestions:function(){var e=this;e.stopKillSuggestions(),e.intervalId=window.setInterval(function(){e.visible&&(e.el.val(e.currentValue),e.hide()),e.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var e=this.el.val().length,t=this.element.selectionStart;return"number"==typeof t?t===e:!document.selection||((t=document.selection.createRange()).moveStart("character",-e),e===t.text.length)},onKeyPress:function(e){var t=this;if(t.disabled||t.visible||e.which!==r||!t.currentValue){if(!t.disabled&&t.visible){switch(e.which){case o:t.el.val(t.currentValue),t.hide();break;case l:if(t.hint&&t.options.onHint&&t.isCursorAtEnd()){t.selectHint();break}return;case s:if(t.hint&&t.options.onHint)return void t.selectHint();if(-1===t.selectedIndex)return void t.hide();if(t.select(t.selectedIndex),!1===t.options.tabDisabled)return;break;case i:if(-1===t.selectedIndex)return void t.hide();t.select(t.selectedIndex);break;case a:t.moveUp();break;case r:t.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else t.suggest()},onKeyUp:function(e){var t=this;if(!t.disabled){switch(e.which){case a:case r:return}clearInterval(t.onChangeInterval),t.currentValue!==t.el.val()&&(t.findBestHint(),0s&&(e.suggestions=e.suggestions.slice(0,s)),e},getSuggestions:function(o){var e,t,n,s=this,i=s.options,a=i.serviceUrl;i.params[i.paramName]=o,e=i.ignoreParams?null:i.params,!1!==i.onSearchStart.call(s.element,i.params)&&("function"==typeof i.lookup?i.lookup(o,function(e){s.suggestions=e.suggestions,s.suggest(),i.onSearchComplete.call(s.element,o,e.suggestions)}):(n=s.isLocal?s.getSuggestionsLocal(o):("function"==typeof a&&(a=a.call(s.element,o)),t=a+"?"+d.param(e||{}),s.cachedResponse[t]))&&Array.isArray(n.suggestions)?(s.suggestions=n.suggestions,s.suggest(),i.onSearchComplete.call(s.element,o,n.suggestions)):s.isBadQuery(o)?i.onSearchComplete.call(s.element,o,[]):(s.abortAjax(),n={url:a,data:e,type:i.type,dataType:i.dataType},d.extend(n,i.ajaxSettings),s.currentRequest=d.ajax(n).done(function(e){s.currentRequest=null,e=i.transformResult(e,o),s.processResponse(e,o,t),i.onSearchComplete.call(s.element,o,e.suggestions)}).fail(function(e,t,n){i.onSearchError.call(s.element,o,e,t,n)})))},isBadQuery:function(e){if(!this.options.preventBadQueries)return!1;for(var t=this.badQueries,n=t.length;n--;)if(0===e.indexOf(t[n]))return!0;return!1},hide:function(){var e=this,t=d(e.suggestionsContainer);"function"==typeof e.options.onHide&&e.visible&&e.options.onHide.call(e.element,t),e.visible=!1,e.selectedIndex=-1,clearInterval(e.onChangeInterval),d(e.suggestionsContainer).hide(),e.signalHint(null)},suggest:function(){var e,t,n,o,s,i,a,l,r,u,c,g;0===this.suggestions.length?this.options.showNoSuggestionNotice?this.noSuggestions():this.hide():(t=(e=this).options,n=t.groupBy,o=t.formatResult,s=e.getQuery(e.currentValue),i=e.classes.suggestion,a=e.classes.selected,l=d(e.suggestionsContainer),r=d(e.noSuggestionsContainer),u=t.beforeRender,c="",t.triggerSelectOnValidInput&&e.isExactMatch(s)?e.select(0):(d.each(e.suggestions,function(e,t){n&&(c+=function(e){e=e.data[n];return g===e?"":'
      '+(g=e)+"
      "}(t)),c+='
      '+o(t,s)+"
      "}),this.adjustContainerWidth(),r.detach(),l.html(c),"function"==typeof u&&u.call(e.element,l),e.fixPosition(),l.show(),t.autoSelectFirst&&(e.selectedIndex=0,l.scrollTop(0),l.children("."+i).first().addClass(a)),e.visible=!0,e.findBestHint()))},noSuggestions:function(){var e=d(this.suggestionsContainer),t=d(this.noSuggestionsContainer);this.adjustContainerWidth(),t.detach(),e.empty(),e.append(t),this.fixPosition(),e.show(),this.visible=!0},adjustContainerWidth:function(){var e=this.options,t=d(this.suggestionsContainer);"auto"===e.width&&(e=this.el.outerWidth()-2,t.width(0t.selectedIndex?(o=s.get(t.selectedIndex),d(o).addClass(n),o):null},selectHint:function(){var e=d.inArray(this.hint,this.suggestions);this.select(e)},select:function(e){this.hide(),this.onSelect(e)},moveUp:function(){var e=this;if(-1!==e.selectedIndex)return 0===e.selectedIndex?(d(e.suggestionsContainer).children().first().removeClass(e.classes.selected),e.selectedIndex=-1,e.el.val(e.currentValue),void e.findBestHint()):void e.adjustScroll(e.selectedIndex-1)},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(e){var t,n,o,s=this,i=s.activate(e);i&&(t=d(i).outerHeight(),i=i.offsetTop,o=(n=d(s.suggestionsContainer).scrollTop())+s.options.maxHeight-t,i .wd-scroll-content"),l=o.data("post_type"),c=woodmart_settings.ajaxurl+"?action=woodmart_ajax_search",u=parseInt(o.data("price")),p=o.data("sku"),m=o.parents(".wd-search-full-screen-2").length,h=e.find(".wd-dropdown-results");0'+woodmart_settings.all_results+"
      "),w(e).removeAttr("style")},onSearchComplete:function(){o.removeClass("search-loading"),woodmartThemeModule.$document.trigger("wood-images-loaded")},formatResult:function(e,t){var t="("+(t="&"===t?"&":t).replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+")",a="";return e.divider&&(a+='
      '+e.divider+"
      "),s&&e.thumbnail&&(a+='
      '+e.thumbnail+"
      "),e.value&&(a=(a+='
      ')+'

      '+e.value.replace(new RegExp(t,"gi"),"$1").replace(/<(\/?strong)>/g,"<$1>")+"

      "),p&&e.sku&&(a+='

      '+e.sku+"

      "),u&&e.price&&(a+='

      '+e.price+"

      "),e.value&&(a+="
      "),e.products_not_found&&(a=''+e.value+""),m&&e.no_results&&h.addClass("wd-no-results"),h.addClass("wd-opened"),o.parents("div[class*='wd-search-full-']").addClass("wd-searched"),a}}),r.length&&(e=o.find('[type="text"]').devbridgeAutocomplete(),t=woodmart_settings.ajaxurl+"?action=woodmart_ajax_search",0 .wd-scroll-content").on("click",function(e){e.stopPropagation()})})},w(document).ready(function(){woodmartThemeModule.ajaxSearch()})}(jQuery); !function(c){woodmartThemeModule.loginSidebar=function(){var e=woodmartThemeModule.$body,o=c(".login-form-side"),n=c(".wd-close-side"),d=(c(".login-side-opener").on("click",function(e){o.length&&(e.preventDefault(),t()?d():setTimeout(function(){i()},10))}),e.on("click touchstart",".wd-close-side",function(){t()&&d()}),e.on("click",".close-side-widget",function(e){e.preventDefault(),t()&&d()}),woodmartThemeModule.$document.on("keyup",function(e){27===e.keyCode&&t()&&d()}),function(){o.removeClass("wd-opened"),n.removeClass("wd-close-side-opened")}),i=function(){o.find("form").removeClass("hidden-form"),o.addClass("wd-opened"),n.addClass("wd-close-side-opened")},t=(0 ul").length&&i(),function(){return o.hasClass("wd-opened")})},c(document).ready(function(){woodmartThemeModule.loginSidebar()})}(jQuery); !function(m){woodmartThemeModule.miniCartQuantity=function(){var i;woodmartThemeModule.$document.on("change input",".woocommerce-mini-cart .quantity .qty",function(){var t=m(this),e=t.val(),n=t.parents(".woocommerce-mini-cart-item").data("key"),a=t.attr("max"),o=woodmart_settings.cart_hash_key,r=woodmart_settings.fragment_name;clearTimeout(i),parseInt(e)>parseInt(a)&&(e=a),i=setTimeout(function(){t.parents(".mini_cart_item").addClass("wd-loading"),m.ajax({url:woodmart_settings.ajaxurl,data:{action:"woodmart_update_cart_item",item_id:n,qty:e},success:function(i){i&&i.fragments&&(m.each(i.fragments,function(t,e){var a,o,r;m(t).hasClass("widget_shopping_cart_content")?(a=m(e).find('.woocommerce-mini-cart-item[data-key="'+n+'"]'),o=m(e).find(".shopping-cart-widget-footer"),r=m(t).find('.woocommerce-mini-cart-item[data-key="'+n+'"]'),i.cart_hash?(r.replaceWith(a),m(".shopping-cart-widget-footer").replaceWith(o)):m(t).replaceWith(e)):m(t).replaceWith(e)}),woodmartThemeModule.supports_html5_storage&&(sessionStorage.setItem(r,JSON.stringify(i.fragments)),localStorage.setItem(o,i.cart_hash),sessionStorage.setItem(o,i.cart_hash),i.cart_hash&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())),woodmartThemeModule.$body.trigger("wc_fragments_refreshed"))},dataType:"json",method:"GET"})},500)})},m(document).ready(function(){woodmartThemeModule.miniCartQuantity()})}(jQuery); !function(n){woodmartThemeModule.woocommerceQuantity=function(){String.prototype.getDecimals||(String.prototype.getDecimals=function(){var t=(""+this).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}),woodmartThemeModule.$document.on("click",".plus, .minus",function(){var t=n(this),a=t.closest(".quantity").find(".qty"),e=parseFloat(a.val()),o=parseFloat(a.attr("max")),r=parseFloat(a.attr("min")),i=a.attr("step");e&&""!==e&&"NaN"!==e||(e=0),""!==o&&"NaN"!==o||(o=""),""!==r&&"NaN"!==r||(r=0),"any"!==i&&""!==i&&void 0!==i&&"NaN"!=parseFloat(i)||(i="1"),t.is(".plus")?o&&o<=e?a.val(o):a.val((e+parseFloat(i)).toFixed(i.getDecimals())):r&&e<=r?a.val(r):00?e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),e(document.body).on("adding_to_cart",function(){e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){s()})}); !function(c){woodmartThemeModule.wishlist=function(){var d="woodmart_wishlist_count",i="woodmart_wishlist_products";if(woodmartThemeModule.$body.hasClass("logged-in")&&(d+="_logged"),woodmart_settings.is_multisite&&(d+="_"+woodmart_settings.current_blog_id,i+="_"+woodmart_settings.current_blog_id),"undefined"!=typeof Cookies){var e=Cookies.get(d),t=0;if(void 0!==e)try{t=JSON.parse(e)}catch(e){console.log("cant parse cookies json")}void 0!==woodmart_settings.wishlist_expanded&&"yes"===woodmart_settings.wishlist_expanded||a(t),woodmartThemeModule.$body.on("click",".wd-wishlist-btn a",function(e){var t=c(this);if(t.hasClass("added"))return!0;e.preventDefault();var o,e=t.data("product-id"),s=t.data("key");woodmartThemeModule.$body.hasClass("logged-in")||"undefined"==typeof Cookies?(t.addClass("loading"),void 0!==woodmart_settings.wishlist_expanded&&"yes"===woodmart_settings.wishlist_expanded&&"disable"!==woodmart_settings.wishlist_show_popup&&woodmartThemeModule.$body.hasClass("logged-in")?woodmartThemeModule.$document.trigger("wdShowWishlistGroupPopup",[e,s]):n(e,"",s)):(s={},void 0!==(o=Cookies.get(i))&&o&&(o=JSON.parse(o),Object.keys(o).length&&(s=o)),s[e]={product_id:e},a(o=Object.keys(s).length),Cookies.set(i,JSON.stringify(s),{expires:7,path:"/",secure:woodmart_settings.cookie_secure_param}),Cookies.set(d,o,{expires:7,path:"/",secure:woodmart_settings.cookie_secure_param}),l(t))}),woodmartThemeModule.$body.on("click",".wd-wishlist-remove",function(e){e.preventDefault();var t,o=c(this),e="";o.parents(".wd-wishlist-group").length&&(e=o.parents(".wd-wishlist-group").data("group-id")),o.addClass("loading"),woodmartThemeModule.$body.hasClass("logged-in")||"undefined"==typeof Cookies||1===o.parents(".products.elements-grid").find(".product-grid-item").length?r(o.data("product-id"),e,o.parents(".wd-products-holder"),function(){o.removeClass("loading")}):(o.parents(".product-grid-item").remove(),e={},void 0!==(t=Cookies.get(i))&&t&&(e=JSON.parse(t),Object.keys(e).length&&delete e[o.data("product-id")]),a(t=Object.keys(e).length),Cookies.set(i,JSON.stringify(e),{expires:7,path:"/",secure:woodmart_settings.cookie_secure_param}),Cookies.set(d,t,{expires:7,path:"/",secure:woodmart_settings.cookie_secure_param}))}),woodmartThemeModule.$body.on("click",".wd-wishlist-checkbox",function(e){var t=c(this),o=t.parents(".product-grid-item"),t=t.parents(".wd-products-element").siblings(".wd-wishlist-bulk-action"),s=t.find(".wd-wishlist-select-all");o.toggleClass("wd-current-product"),s.hasClass("wd-selected")&&t.hasClass("wd-visible")&&!o.hasClass("wd-current-product")&&s.removeClass("wd-selected"),o.siblings(".product").length===o.siblings(".wd-current-product").length&&o.hasClass("wd-current-product")&&s.addClass("wd-selected"),o.siblings(".wd-current-product").length||!t.hasClass("wd-visible")||o.hasClass("wd-current-product")?t.addClass("wd-visible"):t.removeClass("wd-visible")}),woodmartThemeModule.$body.on("click",".wd-wishlist-remove-action > a",function(e){e.preventDefault();var t=c(this),e=t.parents(".wd-wishlist-bulk-action").siblings(".wd-products-element").find(".products"),o=e.find(".wd-current-product"),s=[],d="";o.length&&confirm(woodmart_settings.wishlist_remove_notice)&&(t.addClass("loading"),t.parents(".wd-wishlist-group").length&&(d=t.parents(".wd-wishlist-group").data("group-id")),o.each(function(){s.push(c(this).data("id"))}),r(s,d,e,function(){t.parents(".wd-wishlist-bulk-action").removeClass("wd-visible"),t.removeClass("loading")}))}),woodmartThemeModule.$body.on("click",".wd-wishlist-select-all > a",function(e){e.preventDefault();var e=c(this).parent(),t=e.parents(".wd-wishlist-bulk-action").siblings(".wd-products-element").find(".products");e.hasClass("wd-selected")?(t.find(".product").removeClass("wd-current-product").find(".wd-wishlist-checkbox").prop("checked",!1),e.removeClass("wd-selected"),e.parents(".wd-wishlist-bulk-action").removeClass("wd-visible")):(t.find(".product").addClass("wd-current-product").find(".wd-wishlist-checkbox").prop("checked",!0),e.addClass("wd-selected"))}),woodmartThemeModule.$document.on("wdAddProductToWishlist",function(e,t,o,s,d){n(t,o,s,d)}),woodmartThemeModule.$document.on("wdRemoveProductToWishlist",function(e,t,o,s,d){r(t,o,s,d)}),woodmartThemeModule.$document.on("wdUpdateWishlistContent",function(e,t){var o;t=t,o=c(".wd-wishlist-content"),a(t.count),0